mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
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.
This commit is contained in:
parent
0062513bba
commit
8b490dec55
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user