fix problem happend when tests are running under python-coverage
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 13 Oct 2017 13:17:42 +0300
changeset 1871 933fbe9a5e2c
parent 1870 4d070115b552
child 1872 866fb3ab8778
fix problem happend when tests are running under python-coverage

$ python-coverage run ./tests/tools/test_application.py

Exception while connecting LOCAL://!
Traceback (most recent call last):
File "/home/developer/WorkData/PLC/beremiz/beremiz/ProjectController.py", line 1753, in _Connect
self._SetConnector(connectors.ConnectorFactory(uri, self)
File "/home/developer/WorkData/PLC/beremiz/beremiz/ProjectController.py", line 1702, in _SetConnector
if connector is not None:
PyAssertionError: C++ assertion "m_window" failed at ../src/gtk/dcclient.cpp(2043) in DoGetSize(): GetSize() doesn't work without window
controls/LogViewer.py
--- a/controls/LogViewer.py	Thu Oct 12 16:18:05 2017 +0300
+++ b/controls/LogViewer.py	Fri Oct 13 13:17:42 2017 +0300
@@ -399,7 +399,7 @@
         self.CleanButton.Enable(self.LogSource is not None)
         if log_source is not None:
             self.ResetLogMessages()
-            self.RefreshView()
+            wx.CallAfter(self.RefreshView)
 
     def GetLogMessageFromSource(self, msgidx, level):
         if self.LogSource is not None: