From eceea653ae015d7d66745f56effe5162088496b6 Mon Sep 17 00:00:00 2001 From: UR-0 Date: Tue, 2 Mar 2021 15:39:28 +0100 Subject: [PATCH] [FEM] make ccx_dat_file object (from ccx_Result) ReadOnly --- src/Mod/Fem/femtools/ccxtools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Fem/femtools/ccxtools.py b/src/Mod/Fem/femtools/ccxtools.py index 5ef79a06fa..b3da0f0340 100644 --- a/src/Mod/Fem/femtools/ccxtools.py +++ b/src/Mod/Fem/femtools/ccxtools.py @@ -816,7 +816,10 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject): file = open(dat_result_file, "r") obj.Text = file.read() file.close() - # TODO make the Text of obj read only, or the obj itself + obj.setPropertyStatus("Text", "ReadOnly") # set property editor readonly + if hasattr(obj, "ViewObject"): + obj.ViewObject.ReadOnly = True # set editor view readonly + print(self.analysis) else: raise Exception("FEM: No .dat results found at {}!".format(dat_result_file))