minor changes

This commit is contained in:
Dominik Demuth
2024-01-04 13:22:48 +01:00
parent 71fd0675fc
commit 9068ec2b83
2 changed files with 27 additions and 9 deletions

View File

@@ -904,17 +904,16 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
@QtCore.pyqtSlot(QtWidgets.QAction)
def change_fit_limits(self, action: QtWidgets.QAction):
if self.current_graph_widget is None:
return
if action == self.action_custom_range and self.fit_dialog.isVisible():
self.current_graph_widget.add_external(self.fitregion)
else:
self.current_graph_widget.remove_external(self.fitregion)
def start_fit(self, parameter, links, fit_options):
fit_options['limits'] = {
self.action_no_range: 'none',
self.action_x_range: 'x',
self.action_custom_range: self.fitregion.getRegion()
}[self.ac_group2.checkedAction()]
fit_options['limits'] = self.fit_toolbar.get_limit()
fit_options['fit_mode'] = {
self.action_lm_fit: 'lsq',