mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 22:25:07 +00:00
LibGUI: Disable editing cell when ctrl key is pressed
Disable cell editing when the ctrl key is pressed. This fixes a bug where when doing ctrl+z (undo) and there are no more undo actions on the undo_stack, then a "z" is entered into the cell.
This commit is contained in:
parent
356eca7e33
commit
daaa8a57f0
1 changed files with 2 additions and 1 deletions
|
@ -174,7 +174,8 @@ void TableView::keydown_event(KeyEvent& event)
|
|||
auto is_delete = event.key() == Key_Delete;
|
||||
auto is_backspace = event.key() == Key_Backspace;
|
||||
auto is_clear = is_delete || is_backspace;
|
||||
if (is_editable() && edit_triggers() & EditTrigger::AnyKeyPressed && (event.code_point() != 0 || is_clear)) {
|
||||
auto has_ctrl = event.modifiers() & KeyModifier::Mod_Ctrl;
|
||||
if (is_editable() && edit_triggers() & EditTrigger::AnyKeyPressed && (event.code_point() != 0 || is_clear) && !has_ctrl) {
|
||||
begin_editing(cursor_index());
|
||||
if (m_editing_delegate) {
|
||||
if (is_delete) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue