preview preparation needs to pass list of active data to children

This commit is contained in:
Dominik Demuth 2024-07-05 19:31:09 +02:00
parent a2a95e796a
commit 635c67bba1
2 changed files with 10 additions and 4 deletions

View File

@ -219,8 +219,14 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
if len(self.models) == 1:
self.model_frame.hide()
def _prepare(self, model: list, function_use: list = None,
parameter: dict = None, add_idx: bool = False, cnt: int = 0) -> tuple[dict, int]:
def _prepare(
self,
model: list,
function_use: list = None,
parameter: dict = None,
add_idx: bool = False,
cnt: int = 0,
) -> tuple[dict, int]:
if parameter is None:
parameter = {
@ -263,7 +269,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
if f['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

View File

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