Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Live Viewers can be opened simultaneously #2398

Merged
merged 7 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/release_notes/next/feature-2361-multiple-live-viewers
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#2361: Multiple Live Viewers can now be opened and pointed to different directories simultaneously
2 changes: 1 addition & 1 deletion mantidimaging/gui/windows/live_viewer/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class LiveViewerWindowView(BaseMainWindowView):

def __init__(self, main_window: MainWindowView, live_dir_path: Path) -> None:
super().__init__(None, 'gui/ui/live_viewer_window.ui')
self.setWindowTitle("Mantid Imaging - Live Viewer")
self.main_window = main_window
self.path = live_dir_path
self.setWindowTitle(f"Mantid Imaging - Live Viewer - {str(self.path)}")
self.presenter = LiveViewerWindowPresenter(self, main_window)
self.live_viewer = LiveViewWidget()
self.imageLayout.addWidget(self.live_viewer)
Expand Down
11 changes: 4 additions & 7 deletions mantidimaging/gui/windows/main/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,13 +474,10 @@ def live_view_choose_directory(self) -> None:
self.show_live_viewer(Path(live_data_directory))

def show_live_viewer(self, live_data_path: Path) -> None:
if not self.live_viewer:
self.live_viewer = LiveViewerWindowView(self, live_data_path)
self.live_viewer.show()
else:
self.live_viewer.activateWindow()
self.live_viewer.raise_()
self.live_viewer.show()
self.live_viewer = LiveViewerWindowView(self, live_data_path)
self.live_viewer.activateWindow()
self.live_viewer.raise_()
self.live_viewer.show()
MikeSullivan7 marked this conversation as resolved.
Show resolved Hide resolved

@property
def stack_list(self) -> list[StackId]:
Expand Down
Loading