Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

SelectionActionsPanel: broke off conditional as variable.

Emmet O'Neillbd1fc5f98a78
diff --git a/libs/ui/kis_selection_actions_panel.cpp b/libs/ui/kis_selection_actions_panel.cpp
index c234b63c05..44e4cc9cda 100644
--- a/libs/ui/kis_selection_actions_panel.cpp
+++ b/libs/ui/kis_selection_actions_panel.cpp
@@ -164,7 +164,9 @@ bool KisSelectionActionsPanel::eventFilter(QObject *obj, QEvent *event)
}
}
- if (event->type() == QEvent::MouseMove && d->m_dragging) {
+ bool dragEvent = event->type() == QEvent::MouseMove && d->m_dragging;
+
+ if (dragEvent) {
QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
QPoint newPos = mouseEvent->pos() - d->m_dragStartOffset;