diff -r deadfe7377e9 -r 131610a94da0 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)