-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wxGUI/PyShell: check for wxPython version #1160
Conversation
Successfully tested on Linux (Fedora 33). |
Would this be better? shellargs = dict(parent=self, id=wx.ID_ANY, introText=self.intro,
locals={'gs': grass, 'AddLayer': self.AddLayer})
# useStockId should be False on macOS
# useStockId did not exist before wxPython 4.0.2
if sys.platform == "darwin" and CheckWxVersion([4, 0, 2]):
shellargs['useStockId'] = False
self.shell = PyShell(**shellargs) |
Nice, I'd say it would be. Updated PR with a Black formatted version of what you suggested. Thanks! |
Backport needed right after (together with) #818. |
Thanks! |
#818 is so far scheduled for 7.8.6, so same milestone here. If you want me to anticipate both for milestone 7.8.5 , let me know. |
No, 7.8.6 at the earliest for both. Thank you! |
Now we have the 7.8.6 milestone open: backport or postpone, @nilason ? |
please see: #818 (comment) |
May I leave the backporting of this and the related ticket(s) directly to you? ... may be easier :-) |
I’m glad to give it go :-) |
Fixes #785 (backport of 5fd8c29) The main problem with stock id buttons is that they all come with a key binding. E.g. Close, Clear and Copy have the same key binding ctrl+c and causes problems at least for mac. To remedy this issue we are using subclassed versions of Button: ClearButton, CancelButton, ApplyButton). I also made some effort to implement ESC to close dialog (attribute table manager, mapcalc). Note: for module dialogs (forms.py) and Map calculator I have replaced ctrl+c to copy selected text, not to copy the whole command. This also addresses a subsequent issue (#1156) introduced by 5fd8c29, with an added check for wxPython version (backport of 1ee82f0).
Add a wxPython version check on using
useStockId
parameter on (Py)Shell init call.Fixes #1156