add exclude range to fit limits (#237)
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 1m43s

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: #237
This commit was merged in pull request #237.
This commit is contained in:
2024-02-07 17:55:07 +00:00
parent 567148b7e6
commit 40746bfa7c
5 changed files with 24 additions and 5 deletions

View File

@@ -888,7 +888,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
self.fit_dialog.load(self.management.active_sets)
for item in self.fit_dialog.preview_lines:
self.current_graph_widget.add_external(item)
if self.action_custom_range.isChecked():
if self.action_custom_range.isChecked() or self.actionExclude_region.isChecked():
self.current_graph_widget.add_external(self.fit_toolbar.region)
block_window = True
@@ -904,7 +904,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
if self.current_graph_widget is None:
return
if action == self.action_custom_range and self.fit_dialog.isVisible():
if action in [self.action_custom_range, self.actionExclude_region] and self.fit_dialog.isVisible():
self.current_graph_widget.add_external(self.fit_toolbar.region)
else:
self.current_graph_widget.remove_external(self.fit_toolbar.region)