Introduce centralized shortcut handling#642
Conversation
|
@rainman110 In future features I will need to use these shortcuts again, so having a centralized shortcut handling will be helpful. |
|
|
||
| registerShortCut(id::EVAL, {Qt::CTRL + Qt::Key_E}); | ||
| registerShortCut(id::INTERRUPT, {Qt::CTRL + Qt::Key_I}); | ||
| registerShortCut(id::SAVE, {Qt::CTRL + Qt::Key_S}); |
There was a problem hiding this comment.
doesn't this bite with GTlab's own STRG+S save command?
There was a problem hiding this comment.
No, it doesn’t, since the shortcut is added to the Python Module category, while GTlab’s own Strg+S is in the Core category. However, there is a known issue with the saving behavior in the Python Task wizard. It is described in #86. I think this should be fixed in a separate PR.
There was a problem hiding this comment.
@rainman110 In PR #643, the Python wizard was updated so that the Save button and its local Strg+S shortcut were removed. This resolves the previous confusion caused by inconsistent Strg+S behavior. I will also remove the Strg+S shortcut registration from here.
This PR introduces a centralized shortcut handling for the Python Module.
All module-related shortcuts (Evaluate Script and Interrupt Evaluation) are now registered in GTlab’s shortcut list and accessed through centralized functions. This ensures consistent shortcut usage across the Python Module.
Closes #641