File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -92,21 +92,17 @@ void QgsLayoutView::setCurrentLayout( QgsLayout *layout )
92
92
93
93
viewChanged ();
94
94
95
- delete mSnapMarker ;
95
+ // IMPORTANT!
96
+ // previous snap markers, snap lines are owned by previous layout - so don't delete them here!
96
97
mSnapMarker = new QgsLayoutViewSnapMarker ();
97
98
mSnapMarker ->hide ();
98
99
layout->addItem ( mSnapMarker );
99
-
100
- delete mHorizontalSnapLine ;
101
100
mHorizontalSnapLine = createSnapLine ();
102
101
mHorizontalSnapLine ->hide ();
103
102
layout->addItem ( mHorizontalSnapLine );
104
- delete mVerticalSnapLine ;
105
103
mVerticalSnapLine = createSnapLine ();
106
104
mVerticalSnapLine ->hide ();
107
105
layout->addItem ( mVerticalSnapLine );
108
-
109
- delete mSectionLabel ;
110
106
mSectionLabel = nullptr ;
111
107
112
108
if ( mHorizontalRuler )
You can’t perform that action at this time.
0 commit comments