From 00a137995ae471d829cab3fb6515b24326af51fd Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Tue, 7 Feb 2017 17:11:41 +0100 Subject: [PATCH] debug --- src/salome_hydro/gui_utils.py | 6 +++--- src/salome_hydro/pytel/gui.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/salome_hydro/gui_utils.py b/src/salome_hydro/gui_utils.py index 0879e58..84b1683 100644 --- a/src/salome_hydro/gui_utils.py +++ b/src/salome_hydro/gui_utils.py @@ -40,11 +40,11 @@ class OverrideCursorCM: """ def __init__(self, cursor): self.cursor = cursor - + def __enter__(self): #QtGui.QApplication.setOverrideCursor(self.cursor) QApplication.setOverrideCursor(self.cursor) - + def __exit__(self, exc_type, exc_value, traceback): #QtGui.QApplication.restoreOverrideCursor() QApplication.restoreOverrideCursor() @@ -59,7 +59,7 @@ def get_and_check_selected_file_path(): attribute contains a valid file path, and return this file path. """ ed = getStudyEditor() - if len(salome.sg.getSelected()) == 0 : return None + if len(salome.sg.getAllSelected()) == 0 : return None sobj = ed.study.FindObjectID(salome.sg.getSelected(0)) filepath = sobj.GetComment() if not os.path.isfile(filepath): diff --git a/src/salome_hydro/pytel/gui.py b/src/salome_hydro/pytel/gui.py index 91571a0..0e371c2 100755 --- a/src/salome_hydro/pytel/gui.py +++ b/src/salome_hydro/pytel/gui.py @@ -33,7 +33,7 @@ def create_case_pytel(): def edit_selected_case_pytel(): file=get_and_check_selected_file_path() if file == None : - file, filt = QFileDialog.getOpenFileName(self, self.tr("Open Pytel file"), "", ) + file, filt = QFileDialog.getOpenFileName(sgPyQt.getDesktop(), "Open Pytel file", "", ) EficasForPytelAppli(fichier=file) def get_params_from_selected_case(): -- 2.39.2