From 3baa06a3231ccf18bcfdfcb2fd33ef479db76703 Mon Sep 17 00:00:00 2001 From: Yoann AUDOUIN Date: Wed, 20 Dec 2017 10:38:16 +0100 Subject: [PATCH] Removing broken functionalities --- src/HYDROGUI/HYDROSOLVERGUI.py | 40 ---------------------------------- 1 file changed, 40 deletions(-) diff --git a/src/HYDROGUI/HYDROSOLVERGUI.py b/src/HYDROGUI/HYDROSOLVERGUI.py index 4dab61c..d1823f7 100755 --- a/src/HYDROGUI/HYDROSOLVERGUI.py +++ b/src/HYDROGUI/HYDROSOLVERGUI.py @@ -57,8 +57,6 @@ class GUIcontext: EDIT_MASCARET_CASE_ID = 943 SHOW_LOG_ID = 944 CREATE_TELEMAC2D_CASE_ID = 945 - RUN_TELEMAC2D_ID = 946 - EDIT_TELEMAC2D_CASE_ID = 947 OPEN_SCHEMA_IN_YACS_ID = 950 CREATE_PYTEL_CASE_ID = 951 RUN_PYTEL_ID = 952 @@ -154,10 +152,6 @@ class GUIcontext: sgPyQt.createAction( GUIcontext.GEN_TELEMAC2D_YACS_ID, "Generate YACS script", "Generate YACS script", "Generate a YACS script from the eficas date" ) - sgPyQt.createAction( GUIcontext.RUN_TELEMAC2D_ID, "Compute case", "Compute case", - "Run Telemac2D solver to compute the case" ) - sgPyQt.createAction( GUIcontext.EDIT_TELEMAC2D_CASE_ID, "Edit case", "Edit case", - "Edit the selected Telemac2D case" ) sgPyQt.createAction( GUIcontext.RUN_PYTEL_ID, "Compute case", "Compute case", "Run Pytel launcher to compute the case" ) @@ -277,8 +271,6 @@ def createPopupMenu(popup, context): popup.addAction(sgPyQt.action(GUIcontext.EDIT_MASCARET_CASE_ID)) popup.addAction(sgPyQt.action(GUIcontext.RUN_MASCARET_ID)) elif selectedType == hydro_study.TELEMAC2D_CASE_TYPE_ID: - popup.addAction(sgPyQt.action(GUIcontext.EDIT_TELEMAC2D_CASE_ID)) - popup.addAction(sgPyQt.action(GUIcontext.RUN_TELEMAC2D_ID)) popup.addAction(sgPyQt.action(GUIcontext.GEN_TELEMAC2D_PYTHON_ID)) popup.addAction(sgPyQt.action(GUIcontext.GEN_TELEMAC2D_YACS_ID)) elif selectedType == hydro_study.LOG_TYPE_ID: @@ -391,36 +383,6 @@ def create_telemac2d_case(): def edit_telemac2d_case(): EficasForTelemac2DAppli(get_and_check_selected_file_path()) -# Run Telemac2D on selected case -def run_telemac2d(): - engine = None - try: - with wait_cursor: - ed = hydro_study.HydroStudyEditor() - entry = salome.sg.getSelected(0) - engine = salome.lcc.FindOrLoadComponent("Telemac2DContainer", "TELEMAC2D") - engine.Compute(ed.editor.studyId, entry) - # Stop container after execution so that we can use another fortran user file in the next run - engine.GetContainerRef().Shutdown() - except SALOME.SALOME_Exception, exc: - if engine is not None: - engine.GetContainerRef().Shutdown() - msg = unicode(QApplication.translate("run_telemac2d", - "An error happened while trying to run Telemac2D:")) - msg += "\n" + exc.details.text - raise HSGUIException(msg) - except Exception, exc: - logger.exception("An error happened in the computation (Telemac2D probably crashed).") - try: - engine.GetContainerRef().Shutdown() - except: - pass - msg = unicode(QApplication.translate("run_telemac2d", - "An error happened in the computation (Telemac2D probably crashed, " - "see logs and listing files for more details):")) - msg += "\n" + unicode(exc) - raise HSGUIException(msg) - ### # Generate a python script from the eficas file ### @@ -505,10 +467,8 @@ dict_command = { GUIcontext.EDIT_MASCARET_CASE_ID: edit_mascaret_case, GUIcontext.SHOW_LOG_ID: show_log, GUIcontext.CREATE_TELEMAC2D_CASE_ID: create_telemac2d_case, - GUIcontext.RUN_TELEMAC2D_ID: run_telemac2d, GUIcontext.GEN_TELEMAC2D_PYTHON_ID: generate_telemac2d_python, GUIcontext.GEN_TELEMAC2D_YACS_ID: generate_telemac2d_yacs, - GUIcontext.EDIT_TELEMAC2D_CASE_ID: edit_telemac2d_case, GUIcontext.OPEN_SCHEMA_IN_YACS_ID: open_schema_in_yacs, GUIcontext.CREATE_PYTEL_CASE_ID: create_case_pytel, GUIcontext.RUN_PYTEL_ID: run_selected_case_pytel, -- 2.39.2