Skip to content

Commit

Permalink
Make canvas not eat key presses and releases
Browse files Browse the repository at this point in the history
It steals them from the main window's tool switch functionality, causing
temporary tool switches to stop working.
  • Loading branch information
askmeaboutlo0m committed Nov 10, 2024
1 parent f27c9ab commit c4e090a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Unreleased Version 2.2.2-pre
* Feature: Color circle dock with gamut masks, available through View > Docks > Color Circle. Similar to Krita's Artistic Color Selector and MyPaint's HSV/HCY Wheel.
* Fix: Make temporary tool switches by holding a key down work again. Thanks 3rd_EFNO and bunnie for reporting.

2024-11-06 Version 2.2.2-beta.4
* Fix: Solve rendering glitches with selection outlines that happen on some systems. Thanks xxxx for reporting.
Expand Down
2 changes: 0 additions & 2 deletions src/desktop/scene/canvasview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,6 @@ void CanvasView::keyPressEvent(QKeyEvent *event)
return;
}

event->accept();
m_keysDown.insert(Qt::Key(event->key()));

if(m_dragmode == ViewDragMode::Started && m_dragButton != Qt::NoButton) {
Expand Down Expand Up @@ -1652,7 +1651,6 @@ void CanvasView::keyReleaseEvent(QKeyEvent *event)
return;
}

event->accept();
bool wasDragging = m_dragmode == ViewDragMode::Started;
if(wasDragging) {
CanvasShortcuts::Match dragMatch =
Expand Down
2 changes: 0 additions & 2 deletions src/desktop/view/canvascontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,6 @@ void CanvasController::handleKeyPress(QKeyEvent *event)
return;
}

event->accept();
m_keysDown.insert(Qt::Key(key));

Qt::KeyboardModifiers modifiers = getKeyboardModifiers(event);
Expand Down Expand Up @@ -879,7 +878,6 @@ void CanvasController::handleKeyRelease(QKeyEvent *event)
return;
}

event->accept();
bool wasDragging = m_dragMode == ViewDragMode::Started;
if(wasDragging) {
CanvasShortcuts::Match dragMatch =
Expand Down

0 comments on commit c4e090a

Please sign in to comment.