# HG changeset patch # User Andrey Skvortsov # Date 1477498406 -10800 # Node ID 131610a94da0dc0ae4b9c571c7602329d2a5aeb3 # Parent deadfe7377e92315bea23580cc37acd06cdedacd fix issue with empty frame with generated ST code 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)