From 41a2c68d97a7ba90500bfb412bdbbe33ce93fd25 Mon Sep 17 00:00:00 2001 From: Miquel Navarro <mnavarro@cells.es> Date: Tue, 30 Jul 2024 11:58:25 +0200 Subject: [PATCH 1/2] Correctly looping through pages --- lib/taurus/qt/qtgui/taurusgui/appsettingswizard.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/taurus/qt/qtgui/taurusgui/appsettingswizard.py b/lib/taurus/qt/qtgui/taurusgui/appsettingswizard.py index a03cbf3dd..1d2fee8f4 100644 --- a/lib/taurus/qt/qtgui/taurusgui/appsettingswizard.py +++ b/lib/taurus/qt/qtgui/taurusgui/appsettingswizard.py @@ -288,7 +288,7 @@ class ProjectPage(BasePage): Qt.QMessageBox.warning( self, "Error loading project configuration", - "Could not load the existing configuration.\nReason:%s" + "Could not load the existing configuration.\nReason: %s" % repr(e), Qt.QMessageBox.Cancel, ) @@ -1712,9 +1712,10 @@ class AppSettingsWizard(Qt.QWizard): f = open(fname, "r") xml = f.read() root = etree.fromstring(xml) - - for pageNumber in range(len(self.Pages)): - self.page(pageNumber).fromXml(root) + nextId = 0 + while nextId > -1: + self.page(nextId).fromXml(root) + nextId = self.page(nextId).nextId() def getXml(self): try: -- GitLab From f9c2e6d9632442c105d6f8d3c40a36d52a446780 Mon Sep 17 00:00:00 2001 From: Miquel Navarro <mnavarro@cells.es> Date: Tue, 30 Jul 2024 14:02:20 +0200 Subject: [PATCH 2/2] Fix added to changelog --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96b36161f..6c3f7fdff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,14 +22,15 @@ Add a new TaurusCustomSetting able to manage the default behaviour of save state method. (!1291, #1343) ### Fixed -- Solve memory leak when attributes are not avalaible. (#1318, !1276) +- Solve memory leak when attributes are not avalaible. (!1276, #1318) - Make `PyQtWebEngine` mandatory dependency for `taurus-qt` to fix issues with Taurus Manual panel when the dependency is not installed (!1272, #1287) - **Possible breaking change**: The deviceState of TaurusDevice corresponding to non existent tango devices, is now Undefined instead of NotReady. The deviceState of TaurusDevice corresponding to a running tango device in UNKNOWN state, is now NotReady instead of Undefined. This may break scripts that do something according to NotReady or Undefined deviceStatus. (!1251, #1223) -- Avoid an unnecessary read in ATTR_CONF_EVENT callback. (#1275, !1248/!1288). This read is necessary so the attributes without event get an initial value and doesn't depend on the polling thread, so it was moved to the subscription failure (!1289) +- Avoid an unnecessary read in ATTR_CONF_EVENT callback. (!1248/!1288, #1275). This read is necessary so the attributes without event get an initial value and doesn't depend on the polling thread, so it was moved to the subscription failure (!1289) - Update color names to match Web colors. The colors that are not exactly a Web color, are named "Taurus - x", where x is the most similar Web color (!1287) - Avoid multiple _getElementAlias()_ calls (!1283, #1305) - Avoid multiple _fqdn_no_alias()_ calls (!1286, #1306) +- Fix error when loading an xml from a previously created gui using the _taurus newgui_ wizard. (!1296, #1333/#1200) ## [5.1.8] 2023-11-09 Unnoficial release with some bug fixes. Compatibility with PyTango >= 9.5. -- GitLab