You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(The crux) MainWindow.updateEditMenu calls the setChecked method of the masking check box to ensure it's state matches that of the view. If this call changes the state of that check box, then the callback method is going to trigger an applyChanges call and create a new view.
It seems to me that the default value of the masking check box in the color dialog doesn't match the view setting and results in the creation of a new view.
I verified this by adding this line in MainWindow.createMenuBar
self.maskingAction.setChecked(True)
before the item is connected to its callback method. This removed the superfluous previous view.
Because this mismatch in default value vs. widget state is subtle and likely to occur again, it might be good to consider a setting on the MainWindow class that disables the generation of new views until the GUI has finished loading.
The text was updated successfully, but these errors were encountered:
In #99 @kkiesling noted that a previous view appears in the
Edit
menu before any changes have been applied by the user.The flow which causes this is:
MainWindow
PlotIndependent.masking
is set toTrue
for the initial current and active view.MainWindow.loadGui
andMainWindow.updateEditMenu
is calledMainWindow.updateEditMenu
calls thesetChecked
method of the masking check box to ensure it's state matches that of the view. If this call changes the state of that check box, then the callback method is going to trigger anapplyChanges
call and create a new view.It seems to me that the default value of the masking check box in the color dialog doesn't match the view setting and results in the creation of a new view.
I verified this by adding this line in
MainWindow.createMenuBar
before the item is connected to its callback method. This removed the superfluous previous view.
Because this mismatch in default value vs. widget state is subtle and likely to occur again, it might be good to consider a setting on the
MainWindow
class that disables the generation of new views until the GUI has finished loading.The text was updated successfully, but these errors were encountered: