From 4da5f9ce28a965302cfa464f9b37b0b478f32266 Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 27 Jan 2016 18:43:04 +0300 Subject: [PATCH] PyQt4/PyQt5 support: use new PyQt signals/slots approach, which has been introduced since PyQt-4.5 version and supported in the PyQt5. --- src/ATOMGENGUI/ATOMGENGUI.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ATOMGENGUI/ATOMGENGUI.py b/src/ATOMGENGUI/ATOMGENGUI.py index c53953b..c464523 100644 --- a/src/ATOMGENGUI/ATOMGENGUI.py +++ b/src/ATOMGENGUI/ATOMGENGUI.py @@ -197,7 +197,7 @@ def activate(): # connect selection selection = __study_data_map__[ studyId ][ "selection" ] selection.ClearIObjects() - Connect( selection, "currentSelectionChanged()", selectionChanged ) + selection.currentSelectionChanged.connect( selectionChanged ) global myRunDlg if myRunDlg: myRunDlg.close() @@ -214,7 +214,7 @@ def deactivate(): studyId = myStudy._get_StudyId() selection = __study_data_map__[ studyId ][ "selection" ] selection.ClearIObjects() - Disconnect( selection, "currentSelectionChanged()", selectionChanged ) + selection.currentSelectionChanged.disconnect( selectionChanged ) global myRunDlg if myRunDlg: myRunDlg.close() @@ -304,9 +304,9 @@ class RunDlg(QDialog, Ui_RunDlg): selection = __study_data_map__[ myStudy._get_StudyId() ][ "selection" ] if not self.allCheck.isChecked(): - Connect( selection, "currentSelectionChanged()", self, "selectionChanged()" ) + selection.currentSelectionChanged.connect(self.selectionChanged) else: - Disconnect( selection, "currentSelectionChanged()", self, "selectionChanged()" ) + selection.currentSelectionChanged.connect(self.selectionChanged) pass def selectionChanged(self): -- 2.39.2