@@ -321,17 +321,6 @@ def __init__(self, napari_viewer):
321
321
)
322
322
self .video_widget .setVisible (False )
323
323
324
- # Add some buttons to load files and data (as a complement to drag/drop)
325
- hlayout = QHBoxLayout ()
326
- load_config_button = QPushButton ("Load config file" )
327
- load_config_button .clicked .connect (self ._load_config )
328
- hlayout .addWidget (load_config_button )
329
-
330
- self .load_data_button = QPushButton ("Load data folder" )
331
- self .load_data_button .clicked .connect (self ._load_data_folder )
332
- hlayout .addWidget (self .load_data_button )
333
- self ._layout .addLayout (hlayout )
334
-
335
324
hlayout = QHBoxLayout ()
336
325
trail_label = QLabel ("Show trails" )
337
326
self ._trail_cb = QCheckBox ()
@@ -386,26 +375,6 @@ def settings(self):
386
375
def start_tutorial (self ):
387
376
Tutorial (self .viewer .window ._qt_window .__wrapped__ ).show ()
388
377
389
- def _load_config (self ):
390
- config = QFileDialog .getOpenFileName (
391
- self , "Select a configuration file" , "" , "Config files (*.yaml)"
392
- )
393
- if not config :
394
- return
395
-
396
- try : # Needed to silence a late ValueError caused by the layer having no data
397
- self .viewer .open (config , plugin = "napari-deeplabcut" , stack = False )
398
- except ValueError :
399
- pass
400
-
401
- def _load_data_folder (self ):
402
- dialog = QFileDialog (self )
403
- dialog .setFileMode (QFileDialog .Directory )
404
- dialog .setViewMode (QFileDialog .Detail )
405
- if dialog .exec_ ():
406
- folder = dialog .selectedFiles ()[0 ]
407
- self .viewer .open (folder , plugin = "napari-deeplabcut" )
408
-
409
378
def _move_image_layer_to_bottom (self , index ):
410
379
if (ind := index ) != 0 :
411
380
self .viewer .layers .move_selected (ind , 0 )
@@ -679,7 +648,6 @@ def on_insert(self, event):
679
648
}
680
649
)
681
650
self ._trail_cb .setEnabled (True )
682
- self .load_data_button .setDisabled (True )
683
651
684
652
# Hide the color pickers, as colormaps are strictly defined by users
685
653
controls = self .viewer .window .qt_viewer .dockLayerControls
@@ -709,7 +677,6 @@ def on_remove(self, event):
709
677
menu .deleteLater ()
710
678
menu .destroy ()
711
679
self ._trail_cb .setEnabled (False )
712
- self .load_data_button .setDisabled (False )
713
680
self .last_saved_label .hide ()
714
681
elif isinstance (layer , Image ):
715
682
self ._images_meta = dict ()
0 commit comments