ivoflipse / Pawlabeling

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

Refactor the measurement tree out of the processing and analysis widget #108

Closed ivoflipse closed 10 years ago

ivoflipse commented 10 years ago

The measurement tree is basically duplicated between these two widgets and given that it pretty much acts identically, it would probably work better if it were a stand alone widget.

I tried the same with iApp, but ran into issues with both trees responding to the same events and performing actions while I was on another tab.

Perhaps this could be worked around the same way settings and model work, by creating a single instance of the class in the module itself and importing that from the processing and analysis widgets.

ivoflipse commented 10 years ago

Trying to separate these widgets is proving slightly tricky, because lots of functions update both the contacts and the tree. Time to separate those tasks

ivoflipse commented 10 years ago

Turns out I was wrong. After I tried the code, it seems an instance of a widget can only be added to one widget. This means that either I add the widget to the layout again when I switch tabs or I need two instances.

Hopefully, because of the refactoring, there won't be any nasty race conditions where the processing and analysis tab will both be fighting for attention... Else I'll have to come up with a better solution.