@@ -321,9 +321,9 @@ def __init__(self, napari_viewer):
321
321
load_config_button .clicked .connect (self ._load_config )
322
322
hlayout .addWidget (load_config_button )
323
323
324
- load_data_button = QPushButton ("Load data folder" )
325
- load_data_button .clicked .connect (self ._load_data_folder )
326
- hlayout .addWidget (load_data_button )
324
+ self . load_data_button = QPushButton ("Load data folder" )
325
+ self . load_data_button .clicked .connect (self ._load_data_folder )
326
+ hlayout .addWidget (self . load_data_button )
327
327
self ._layout .addLayout (hlayout )
328
328
329
329
hlayout = QHBoxLayout ()
@@ -670,6 +670,7 @@ def on_insert(self, event):
670
670
}
671
671
)
672
672
self ._trail_cb .setEnabled (True )
673
+ self .load_data_button .setDisabled (True )
673
674
674
675
# Hide the color pickers, as colormaps are strictly defined by users
675
676
controls = self .viewer .window .qt_viewer .dockLayerControls
@@ -699,6 +700,7 @@ def on_remove(self, event):
699
700
menu .deleteLater ()
700
701
menu .destroy ()
701
702
self ._trail_cb .setEnabled (False )
703
+ self .load_data_button .setDisabled (False )
702
704
self .last_saved_label .hide ()
703
705
elif isinstance (layer , Image ):
704
706
self ._images_meta = dict ()
0 commit comments