Skip to content

Commit 0088ae0

Browse files
committed
View in a new window / Fix: update hidden items as well
1 parent c684a48 commit 0088ae0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cdl/core/gui/panel/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ def open_separate_view(
11131113
"""
11141114
if oids is None:
11151115
oids = self.objview.get_sel_object_uuids(include_groups=True)
1116-
obj = self.objmodel[oids[0]]
1116+
obj = self.objmodel[oids[-1]] # last selected object
11171117

11181118
if not all([oid in self.plothandler for oid in oids]):
11191119
# This happens for example when opening an already saved workspace with
@@ -1123,7 +1123,9 @@ def open_separate_view(
11231123
# and position, they are hidden), and the plot item of every other image is
11241124
# not created yet. So we need to refresh the plot to create the plot item of
11251125
# those images.
1126-
self.plothandler.refresh_plot("selected", True, True)
1126+
self.plothandler.refresh_plot(
1127+
"selected", update_items=True, force=True, only_visible=False
1128+
)
11271129

11281130
# Create a new dialog and add plot items to it
11291131
dlg = self.create_new_dialog(

0 commit comments

Comments
 (0)