@@ -54,7 +54,7 @@ QgsLayoutView::QgsLayoutView( QWidget *parent )
54
54
mSpacePanTool = new QgsLayoutViewToolTemporaryKeyPan ( this );
55
55
mMidMouseButtonPanTool = new QgsLayoutViewToolTemporaryMousePan ( this );
56
56
mSpaceZoomTool = new QgsLayoutViewToolTemporaryKeyZoom ( this );
57
- mSnapMarker . reset ( new QgsLayoutViewSnapMarker () );
57
+ mSnapMarker = new QgsLayoutViewSnapMarker ();
58
58
59
59
mPreviewEffect = new QgsPreviewEffect ( this );
60
60
viewport ()->setGraphicsEffect ( mPreviewEffect );
@@ -81,16 +81,19 @@ void QgsLayoutView::setCurrentLayout( QgsLayout *layout )
81
81
82
82
viewChanged ();
83
83
84
- mSnapMarker .reset ( new QgsLayoutViewSnapMarker () );
84
+ delete mSnapMarker ;
85
+ mSnapMarker = new QgsLayoutViewSnapMarker ();
85
86
mSnapMarker ->hide ();
86
- layout->addItem ( mSnapMarker . get () );
87
+ layout->addItem ( mSnapMarker );
87
88
88
- mHorizontalSnapLine .reset ( createSnapLine () );
89
+ delete mHorizontalSnapLine ;
90
+ mHorizontalSnapLine = createSnapLine ();
89
91
mHorizontalSnapLine ->hide ();
90
- layout->addItem ( mHorizontalSnapLine .get () );
91
- mVerticalSnapLine .reset ( createSnapLine () );
92
+ layout->addItem ( mHorizontalSnapLine );
93
+ delete mVerticalSnapLine ;
94
+ mVerticalSnapLine = createSnapLine ();
92
95
mVerticalSnapLine ->hide ();
93
- layout->addItem ( mVerticalSnapLine . get () );
96
+ layout->addItem ( mVerticalSnapLine );
94
97
95
98
if ( mHorizontalRuler )
96
99
{
@@ -771,7 +774,7 @@ void QgsLayoutView::mouseMoveEvent( QMouseEvent *event )
771
774
std::unique_ptr<QgsLayoutViewMouseEvent> me ( new QgsLayoutViewMouseEvent ( this , event, false ) );
772
775
if ( mTool ->flags () & QgsLayoutViewTool::FlagSnaps )
773
776
{
774
- me->snapPoint ( mHorizontalSnapLine . get () , mVerticalSnapLine . get () , mTool ->ignoredSnapItems () );
777
+ me->snapPoint ( mHorizontalSnapLine , mVerticalSnapLine , mTool ->ignoredSnapItems () );
775
778
}
776
779
if ( mTool ->flags () & QgsLayoutViewTool::FlagSnaps )
777
780
{
0 commit comments