Merge branch 'master' into dev

This commit is contained in:
Dominik Demuth 2024-07-16 17:00:27 +00:00
commit 7b61c1244d
2 changed files with 11 additions and 5 deletions

View File

@ -219,8 +219,14 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
if len(self.models) == 1: if len(self.models) == 1:
self.model_frame.hide() self.model_frame.hide()
def _prepare(self, model: list, function_use: list = None, def _prepare(
parameter: dict = None, add_idx: bool = False, cnt: int = 0) -> tuple[dict, int]: self,
model: list,
function_use: list = None,
parameter: dict = None,
add_idx: bool = False,
cnt: int = 0,
) -> tuple[dict, int]:
if parameter is None: if parameter is None:
parameter = { parameter = {
@ -263,7 +269,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
if f['children']: if f['children']:
# recurse for children # recurse for children
_, cnt = self._prepare(f['children'], parameter=parameter, add_idx=add_idx, cnt=cnt) _, cnt = self._prepare(f['children'], parameter=parameter, function_use=function_use, add_idx=add_idx, cnt=cnt)
return parameter, cnt return parameter, cnt
@ -495,7 +501,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
if model_p['active']: if model_p['active']:
cnt += self.param_widgets[model_p['cnt']].set_parameter(fit_id, param[cnt:]) cnt += self.param_widgets[model_p['cnt']].set_parameter(fit_id, param[cnt:])
if model_p['children']: if model_p['children']:
cnt += self.set_parameter_iter(fit_id, param, model_p['children'], cnt=cnt) cnt = self.set_parameter_iter(fit_id, param, model_p['children'], cnt=cnt)
return cnt return cnt

View File

@ -12,7 +12,7 @@ from nmreval.lib.logger import logger
from nmreval.io.sessionwriter import NMRWriter from nmreval.io.sessionwriter import NMRWriter
from .management import UpperManagement from .management import UpperManagement
from ..lib.logger import ConsoleDock, QTextHandler from ..lib.logger import QTextHandler
from ..Qt import QtGui, QtPrintSupport from ..Qt import QtGui, QtPrintSupport
from ..data.shift_graphs import QShift from ..data.shift_graphs import QShift
from ..data.signaledit import QPreviewDialog, QBaselineDialog from ..data.signaledit import QPreviewDialog, QBaselineDialog