commented out call to QApplication.ProcessEvents() in xcsw_is_visible()#108
Conversation
| def xcsw_is_visible(self, state): | ||
| if state: | ||
| QApplication.processEvents() | ||
| #QApplication.processEvents() |
There was a problem hiding this comment.
| #QApplication.processEvents() |
Just remove the line instead of commenting it.
There was a problem hiding this comment.
ok thanks, Truth be told I have been running for months with the first proposed change but opted for what I thought would be the less intrusive option 2 of commenting line 1304 but I just ran into a segfault, unless someone has a better suggestion I am am going to revert back to removing the line that connects SIG_VISIBILITY_CHANGED to the x cross section for this PR
|
Please test the following:
I think that it should avoid all the segmentation faults you are experiencing. |
|
The next step would be the following. Import Replace |
|
as per your suggestion I tested replacing the direct calls to processEvents() with If we leave this open for the rest of the week I can keep testing and see if 100 is truly the magic delay |
|
nope the problem remains if using the QTimer solution, the only thing that cures it is to comment out It seems to not cause any problems as far as I can tell as everything behaves as I would expect. |
This is a problem I have had for quite a while and only now getting around to submitting an issue and PR for it.
There are two ways I tested to fix this and both worked and neither caused the plot to behave in a way that did not make sense,
first is to comment this line
https://github.com/PierreRaybaut/guiqwt/blob/56ae061e128bcf95e489c347a475ea83dc22fb5a/guiqwt/plot.py#L1251
and the second was to instead comment out the call to ProcessEvents() in xcsw_is_visible,
https://github.com/PierreRaybaut/guiqwt/blob/56ae061e128bcf95e489c347a475ea83dc22fb5a/guiqwt/plot.py#L1304
I chose the later because it is not ideal to call ProcessEvents directly and it didn't cause the plot to behave strangely.
closes #107