fix issue with empty frame with generated ST code
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Wed, 26 Oct 2016 19:13:26 +0300
changeset 1551 131610a94da0
parent 1550 deadfe7377e9
child 1552 9a59d1de198a
fix issue with empty frame with generated ST code
ProjectController.py
--- a/ProjectController.py	Wed Oct 26 15:51:20 2016 +0300
+++ b/ProjectController.py	Wed Oct 26 19:13:26 2016 +0300
@@ -1119,12 +1119,12 @@
                 self._IECCodeView = IECCodeViewer(self.AppFrame.TabsOpened, "", self.AppFrame, None, instancepath=name)
                 self._IECCodeView.SetTextSyntax("ALL")
                 self._IECCodeView.SetKeywords(IEC_KEYWORDS)
-                self._IECCodeView.Editor.SetReadOnly(True)                
                 try:
                     text = file(plc_file).read()
                 except:
                     text = '(* No IEC code have been generated at that time ! *)'
                 self._IECCodeView.SetText(text = text)
+                self._IECCodeView.Editor.SetReadOnly(True)                                
                 self._IECCodeView.SetIcon(GetBitmap("ST"))
                 setattr(self._IECCodeView, "_OnClose", self.OnCloseEditor)