From 5823ddd18c757eacf82603034273ad96ae002af1 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Fri, 5 Jul 2024 17:31:58 +0000 Subject: [PATCH] preview preparation needs to pass list of active data to children (#280) Co-authored-by: Dominik Demuth Reviewed-on: https://gitea.pkm.physik.tu-darmstadt.de/IPKM/nmreval/pulls/280 --- src/gui_qt/fit/fitwindow.py | 12 +++++++++--- src/gui_qt/main/mainwindow.py | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/gui_qt/fit/fitwindow.py b/src/gui_qt/fit/fitwindow.py index 443e894..6700493 100644 --- a/src/gui_qt/fit/fitwindow.py +++ b/src/gui_qt/fit/fitwindow.py @@ -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 diff --git a/src/gui_qt/main/mainwindow.py b/src/gui_qt/main/mainwindow.py index 34e94ba..4851d40 100644 --- a/src/gui_qt/main/mainwindow.py +++ b/src/gui_qt/main/mainwindow.py @@ -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