Skip to content

Commit

Permalink
ensure ROI window is closed during batch processing
Browse files Browse the repository at this point in the history
  • Loading branch information
leofang committed Aug 5, 2019
1 parent a4d58e8 commit 835727e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nsls2ptycho/ptycho_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,9 +1022,10 @@ def _batch_crop(self):
eventloop.exec()

# then invoke the h5 worker in RoiWindow
if self.roiWindow is None:
img = self._viewDataFrameBroker(0)
self.roiWindow = RoiWindow(image=img, main_window=self)
if self.roiWindow is not None:
self.roiWindow.close()
img = self._viewDataFrameBroker(0)
self.roiWindow = RoiWindow(image=img, main_window=self)
#self.roiWindow.roi_changed.connect(self._get_roi_slot)
self.roiWindow.canvas._eventHandler.set_curr_roi(self.roiWindow.canvas.ax,
(self.sp_batch_x0.value(), self.sp_batch_y0.value()),
Expand Down

0 comments on commit 835727e

Please sign in to comment.