diff --git a/src/sas/qtgui/Utilities/TabbedModelEditor.py b/src/sas/qtgui/Utilities/TabbedModelEditor.py index aef3f65ff5..56ea211f19 100644 --- a/src/sas/qtgui/Utilities/TabbedModelEditor.py +++ b/src/sas/qtgui/Utilities/TabbedModelEditor.py @@ -420,41 +420,6 @@ def checkModel(self, full_path, run_unit_test=True): return error_line - def isModelCorrect(self, full_path): - """ - Run the sasmodels method for model check - and return True if the model is good. - False otherwise. - """ - successfulCheck = True - try: - model_results = GuiUtils.checkModel(full_path) - logging.info(model_results) - # We can't guarantee the type of the exception coming from - # Sasmodels, so need the overreaching general Exception - except Exception as ex: - msg = "Error building model: "+ str(ex) - logging.error(msg) - #print three last lines of the stack trace - # this will point out the exact line failing - last_lines = traceback.format_exc().split('\n')[-4:] - traceback_to_show = '\n'.join(last_lines) - logging.error(traceback_to_show) - - # Set the status bar message - self.parent.communicate.statusBarUpdateSignal.emit("Model check failed") - - # Remove the file so it is not being loaded on refresh - os.remove(full_path) - # Put a thick, red border around the mini-editor - self.plugin_widget.txtFunction.setStyleSheet("border: 5px solid red") - # Use the last line of the traceback for the tooltip - last_lines = traceback.format_exc().split('\n')[-2:] - traceback_to_show = '\n'.join(last_lines) - self.plugin_widget.txtFunction.setToolTip(traceback_to_show) - successfulCheck = False - return successfulCheck - def updateFromEditor(self): """ Save the current state of the Model Editor