Skip to content

Commit

Permalink
#185 Cosmetic.
Browse files Browse the repository at this point in the history
Signed-off-by: cneben <[email protected]>
  • Loading branch information
cneben committed Dec 26, 2022
1 parent a8012b1 commit c7fd793
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/qanDraggableCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
6 changes: 3 additions & 3 deletions src/qanNodeItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit c7fd793

Please sign in to comment.