Skip to content

Commit

Permalink
fix: snap unselected strokes using pointer tool
Browse files Browse the repository at this point in the history
- UBBoardView::itemShouldBeMoved handled strokes and text the same
- text shall not be moved with the pointer tool in some situations
  so that the mouse can be used to mark text
- this however does not apply to strokes
- so for strokes return true regardless of tool and selection state
- note: before strokes have been moved anyway, but by using
  delegation of the event to QGraphicsView
- this code branch skipped snapping
  • Loading branch information
letsfindaway committed Aug 17, 2024
1 parent 23406b4 commit 1847c50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/board/UBBoardView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,9 @@ bool UBBoardView::itemShouldBeMoved(QGraphicsItem *item)
case UBGraphicsMediaItem::Type:
case UBGraphicsVideoItem::Type:
case UBGraphicsAudioItem::Type:
case UBGraphicsStrokesGroup::Type:
return true;

case UBGraphicsStrokesGroup::Type:
case UBGraphicsTextItem::Type:
if (currentTool == UBStylusTool::Play)
return true;
Expand Down

0 comments on commit 1847c50

Please sign in to comment.