We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c058a68 commit 802f7f5Copy full SHA for 802f7f5
src/gui/layout/qgslayoutview.cpp
@@ -92,21 +92,17 @@ void QgsLayoutView::setCurrentLayout( QgsLayout *layout )
92
93
viewChanged();
94
95
- delete mSnapMarker;
+ // IMPORTANT!
96
+ // previous snap markers, snap lines are owned by previous layout - so don't delete them here!
97
mSnapMarker = new QgsLayoutViewSnapMarker();
98
mSnapMarker->hide();
99
layout->addItem( mSnapMarker );
-
100
- delete mHorizontalSnapLine;
101
mHorizontalSnapLine = createSnapLine();
102
mHorizontalSnapLine->hide();
103
layout->addItem( mHorizontalSnapLine );
104
- delete mVerticalSnapLine;
105
mVerticalSnapLine = createSnapLine();
106
mVerticalSnapLine->hide();
107
layout->addItem( mVerticalSnapLine );
108
109
- delete mSectionLabel;
110
mSectionLabel = nullptr;
111
112
if ( mHorizontalRuler )
0 commit comments