From c7fd793ebf109cbc85276b801f4ebd6d985f6612 Mon Sep 17 00:00:00 2001 From: cneben Date: Mon, 26 Dec 2022 17:12:47 +0100 Subject: [PATCH] #185 Cosmetic. Signed-off-by: cneben --- src/qanDraggableCtrl.cpp | 8 ++++---- src/qanNodeItem.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qanDraggableCtrl.cpp b/src/qanDraggableCtrl.cpp index 58e87240..19e3ac49 100644 --- a/src/qanDraggableCtrl.cpp +++ b/src/qanDraggableCtrl.cpp @@ -243,10 +243,10 @@ void DraggableCtrl::dragMove(const QPointF& sceneDragPos, bool dragSelection) // or mouse delta > grid // 2.2.1 Compute snapped position, apply it const auto targetDragOrientation = _targetItem->getDragOrientation(); - const auto dragHorizontally = (targetDragOrientation == qan::NodeItem::DragOrientation::All) || - (targetDragOrientation == qan::NodeItem::DragOrientation::Horizontal); - const auto dragVertically = (targetDragOrientation == qan::NodeItem::DragOrientation::All) || - (targetDragOrientation == qan::NodeItem::DragOrientation::Vertical); + const auto dragHorizontally = (targetDragOrientation == qan::NodeItem::DragOrientation::DragAll) || + (targetDragOrientation == qan::NodeItem::DragOrientation::DragHorizontal); + const auto dragVertically = (targetDragOrientation == qan::NodeItem::DragOrientation::DragAll) || + (targetDragOrientation == qan::NodeItem::DragOrientation::DragVertical); if (getGraph()->getSnapToGrid()) { const auto& gridSize = getGraph()->getSnapToGridSize(); bool applyX = dragHorizontally && diff --git a/src/qanNodeItem.h b/src/qanNodeItem.h index b53edfd2..43eafa0a 100644 --- a/src/qanNodeItem.h +++ b/src/qanNodeItem.h @@ -284,9 +284,9 @@ protected slots: public: //! Define an orientation contrain on node dragging. enum class DragOrientation: unsigned int { - All = 0, //! All is no constrain on dragging: drag in all directions - Vertical = 1, //! Drag only horizontally - Horizontal = 2 //! Drag only vertically + DragAll = 0, //! All is no constrain on dragging: drag in all directions + DragVertical = 1, //! Drag only horizontally + DragHorizontal = 2 //! Drag only vertically }; Q_ENUM(DragOrientation) //! \copydoc getDragOrientation()