Skip to content
Permalink
Browse files

Don't create undo commands for snap settings changes

In practice this turns out to be undesirable - snapping changes
are more of a semi-permenant interface setting as opposed to something
which should be stored in the layout's undo history.
  • Loading branch information
nyalldawson committed Sep 5, 2017
1 parent 0062513 commit 8b490dec55e349f2763ac2b3a03a152a052aa3e0
Showing with 0 additions and 6 deletions.
  1. +0 −6 src/core/layout/qgslayoutsnapper.cpp
@@ -31,23 +31,17 @@ QgsLayout *QgsLayoutSnapper::layout()

void QgsLayoutSnapper::setSnapTolerance( const int snapTolerance )
{
mLayout->undoStack()->beginCommand( this, QObject::tr( "Snap tolerance changed" ), UndoTolerance );
mTolerance = snapTolerance;
mLayout->undoStack()->endCommand();
}

void QgsLayoutSnapper::setSnapToGrid( bool enabled )
{
mLayout->undoStack()->beginCommand( this, QObject::tr( "Snap to grid changed" ), UndoSnapToGrid );
mSnapToGrid = enabled;
mLayout->undoStack()->endCommand();
}

void QgsLayoutSnapper::setSnapToGuides( bool enabled )
{
mLayout->undoStack()->beginCommand( this, QObject::tr( "Snap to guides changed" ), UndoSnapToGuides );
mSnapToGuides = enabled;
mLayout->undoStack()->endCommand();
}

QPointF QgsLayoutSnapper::snapPoint( QPointF point, double scaleFactor, bool &snapped ) const

0 comments on commit 8b490de

Please sign in to comment.
You can’t perform that action at this time.