1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:27:45 +00:00

Chess: Allow right click to cancel drag move while dragging a piece

This commit is contained in:
Brendan Coles 2021-02-18 08:16:17 +00:00 committed by Andreas Kling
parent c2c7c7368b
commit 44aeab43a0

View file

@ -168,7 +168,11 @@ void ChessWidget::mousedown_event(GUI::MouseEvent& event)
GUI::Widget::mousedown_event(event);
if (event.button() == GUI::MouseButton::Right) {
if (m_dragging_piece) {
m_dragging_piece = false;
} else {
m_current_marking.from = mouse_to_square(event);
}
return;
}
m_board_markings.clear();