Skip to content

Commit

Permalink
fix saving
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenwagner committed Nov 30, 2023
1 parent 716b669 commit 14d38af
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/box_manager/_qt/OrganizeLayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,14 @@ def _run_save(self,path=None):
sel_layer = self.save_layers["layer"].currentText()
layers_to_write = []
if sel_layer == "Selected":
for cur_layer in self.napari_viewer.layers.selection:
target_type = napari.layers.Points
if cur_type == "Filaments":
target_type = napari.layers.Shapes
relevant_layers = [x for x in self.napari_viewer.layers.selection if isinstance(x, target_type)]
if len(relevant_layers)==0:
show_error("No coordinate layers selected")
return
for cur_layer in relevant_layers:
if len(cur_layer.data) == 0:
continue
layers_to_write.append(cur_layer)
Expand Down

0 comments on commit 14d38af

Please sign in to comment.