Closed jpirnay closed 1 week ago
The PR fixes a crash that occurs under Linux when attempting to auto-select text in text entry boxes immediately after creation. The fix implements a platform-specific check to skip the text selection functionality on Linux systems, as wxPython appears to have issues when trying to focus and select text in controls that may not be fully initialized.
classDiagram
class HersheyManager {
- bool _islinux
+ signal(signalstr, myargs)
}
note for HersheyManager "_islinux is used to check the platform and avoid crashes on Linux."
classDiagram
class TextPropertyPanel {
- bool _islinux
+ signal(signal, *args)
}
note for TextPropertyPanel "_islinux is used to check the platform and avoid crashes on Linux."
Change | Details | Files |
---|---|---|
Added Linux platform detection and skip text selection logic |
|
meerk40t/gui/hersheymanager.py |
Implemented Linux platform check in text property panel |
|
meerk40t/gui/propertypanels/textproperty.py |
Both the linetext and the regular text tool open the associated property panel after creation. They the try to focus the text entry box and select all text to simplify the text editing process. While this works flawlessly uder Windows and Darwin, this method crashes under Linux. The hypothesis is that wxPython is flawed in this aspect that it will crash if the window / control are not fully established yet. Unfortunately no indicator does expose that unready state. As we can't contain it, we will skip the textselection under Linux. Sorry.
Summary by Sourcery
Bug Fixes: