# HG changeset patch # User Andrey Skvortsov # Date 1473687969 -10800 # Node ID d2b3bbbb10289ece989fef0896e8c881916301b0 # Parent 0a131f6a4c86112f6b57092216ae0ffae969286d# Parent 24d8e8c233bd588392091bc3266d6b7fae5fdd43 Merged in Surkovsv/beremiz (pull request #4) Add hotkey (F12) for switching perspective. diff -r 24d8e8c233bd -r d2b3bbbb1028 .hgignore --- a/.hgignore Mon Sep 12 16:41:21 2016 +0300 +++ b/.hgignore Mon Sep 12 16:46:09 2016 +0300 @@ -2,6 +2,7 @@ syntax: regexp ^tests/.*/build$ +^.idea/.* syntax: regexp ^.*\.pyc$ syntax: regexp diff -r 24d8e8c233bd -r d2b3bbbb1028 ProjectController.py --- a/ProjectController.py Mon Sep 12 16:41:21 2016 +0300 +++ b/ProjectController.py Mon Sep 12 16:46:09 2016 +0300 @@ -1561,11 +1561,8 @@ if connector is not None: if self.StatusTimer is not None: # Start the status Timer - # Suppress WXDEBUG assertions, as happens by default with wx2.8 - try: - self.StatusTimer.Start(milliseconds=500, oneShot=False) - except: - pass + wx.Yield() + self.StatusTimer.Start(milliseconds=500, oneShot=False) else: if self.StatusTimer is not None: # Stop the status Timer diff -r 24d8e8c233bd -r d2b3bbbb1028 controls/DebugVariablePanel/DebugVariablePanel.py --- a/controls/DebugVariablePanel/DebugVariablePanel.py Mon Sep 12 16:41:21 2016 +0300 +++ b/controls/DebugVariablePanel/DebugVariablePanel.py Mon Sep 12 16:46:09 2016 +0300 @@ -291,6 +291,7 @@ DebugViewer.__init__(self, producer, True) self.SetSizer(main_sizer) + self.SetTickTime() def SetTickTime(self, ticktime=0): """ diff -r 24d8e8c233bd -r d2b3bbbb1028 controls/LibraryPanel.py --- a/controls/LibraryPanel.py Mon Sep 12 16:41:21 2016 +0300 +++ b/controls/LibraryPanel.py Mon Sep 12 16:46:09 2016 +0300 @@ -67,8 +67,12 @@ self.OnSearchButtonClick, self.SearchCtrl) # Bind keyboard event on SearchCtrl text control to catch UP and DOWN # for search previous and next occurrence - search_textctrl = self.SearchCtrl.GetChildren()[0] - search_textctrl.Bind(wx.EVT_CHAR, self.OnKeyDown) + + # This protects from fail to start when no children[0] available (possible for wxPython 3.0) + if self.SearchCtrl.GetChildren(): + search_textctrl = self.SearchCtrl.GetChildren()[0] + search_textctrl.Bind(wx.EVT_CHAR, self.OnKeyDown) + main_sizer.AddWindow(self.SearchCtrl, flag=wx.GROW) # Add Splitter window for tree and block comment to main sizer diff -r 24d8e8c233bd -r d2b3bbbb1028 editors/TextViewer.py --- a/editors/TextViewer.py Mon Sep 12 16:41:21 2016 +0300 +++ b/editors/TextViewer.py Mon Sep 12 16:46:09 2016 +0300 @@ -629,6 +629,10 @@ self.SetStyling(current_pos - last_styled_pos + 2, STC_PLC_COMMENT) last_styled_pos = current_pos + 1 state = SPACE + if len(self.CallStack) > 0: + current_call = self.CallStack.pop() + else: + current_call = None elif state == PRAGMA: if line.endswith("}"): self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) diff -r 24d8e8c233bd -r d2b3bbbb1028 tests/logging/plc.xml --- a/tests/logging/plc.xml Mon Sep 12 16:41:21 2016 +0300 +++ b/tests/logging/plc.xml Mon Sep 12 16:46:09 2016 +0300 @@ -1,14 +1,7 @@ - - - - + + + + @@ -47,29 +40,34 @@ - + + + + + + - - - - - - 'Moooooo' + + + + + + 'IEC side logging: beat #' - - + + - - - + + + @@ -83,121 +81,117 @@ - - + + - - - - - - + + + + + + - + beat - - + + - + - - - - + + + + + + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - + count - - + + - + - - - - + + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - + + @@ -211,19 +205,17 @@ - - + + - - - - - - + + + + @@ -237,39 +229,33 @@ - - + + - + - - - - + + - + - - - - + + - + - - - - + + @@ -277,13 +263,72 @@ - - + + - WARNING + lvl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T#3s + + + + + + + @@ -293,8 +338,8 @@ - - + + diff -r 24d8e8c233bd -r d2b3bbbb1028 util/ProcessLogger.py --- a/util/ProcessLogger.py Mon Sep 12 16:41:21 2016 +0300 +++ b/util/ProcessLogger.py Mon Sep 12 16:46:09 2016 +0300 @@ -109,6 +109,7 @@ self.errdata = [] self.keyword = keyword self.kill_it = kill_it + self.startsem = Semaphore(0) self.finishsem = Semaphore(0) self.endlock = Lock() @@ -145,6 +146,7 @@ self.Proc.stderr, self.errors) self.errt.start() + self.startsem.release() def output(self,v): @@ -168,6 +170,7 @@ self.logger.write_warning(_("exited with status %s (pid %s)\n")%(str(ecode),str(pid))) def finish(self, pid,ecode): + self.startsem.acquire() if self.timeout: self.timeout.cancel() self.exitcode = ecode @@ -179,6 +182,7 @@ self.finishsem.release() def kill(self,gently=True): + self.startsem.acquire() self.outt.killed = True self.errt.killed = True if wx.Platform == '__WXMSW__':