ivoflipse / Pawlabeling

Tool for processing and analyzing pressure measurements
Other
18 stars 1 forks source link

Prevent adding measurements if no session has been selected #59

Closed ivoflipse closed 11 years ago

ivoflipse commented 11 years ago

I just tried adding measurements, even though (for reasons unknown) the session wasn't selected automatically. So it went through an entire process for nothing, since it shouldn't have been able to continue (the session in memory belonged to another subject).

So when changing subjects, nuke all cached values and check whether the appropriate information has been set, before continuing.

ivoflipse commented 11 years ago

This should no longer be possible. I've added a check to see whether we have a session_id when creating measurements and a subject_id when creating sessions.

But in all cases, at least something will be selected, because it will automatically select the last item in the tree