@@ -197,18 +197,13 @@ QgsSnappingWidget::QgsSnappingWidget( QgsProject *project, QgsMapCanvas *canvas,
197
197
QToolButton *topoButton = new QToolButton ();
198
198
topoButton->addAction ( mTopologicalEditingAction );
199
199
topoButton->setDefaultAction ( mTopologicalEditingAction );
200
- if ( mDisplayMode == Widget )
201
- {
202
- topoButton->setToolButtonStyle ( Qt::ToolButtonTextBesideIcon );
203
- }
200
+ topoButton->setToolButtonStyle ( Qt::ToolButtonTextBesideIcon );
204
201
layout->addWidget ( topoButton );
202
+
205
203
QToolButton *interButton = new QToolButton ();
206
204
interButton->addAction ( mIntersectionSnappingAction );
207
205
interButton->setDefaultAction ( mIntersectionSnappingAction );
208
- if ( mDisplayMode == Widget )
209
- {
210
- interButton->setToolButtonStyle ( Qt::ToolButtonTextBesideIcon );
211
- }
206
+ interButton->setToolButtonStyle ( Qt::ToolButtonTextBesideIcon );
212
207
layout->addWidget ( interButton );
213
208
214
209
layout->setContentsMargins ( 0 , 0 , 0 , 0 );
@@ -384,8 +379,8 @@ void QgsSnappingWidget::enableIntersectionSnapping( bool enabled )
384
379
385
380
void QgsSnappingWidget::onSnappingTreeLayersChanged ()
386
381
{
382
+ mLayerTreeView ->expandAll ();
387
383
mLayerTreeView ->resizeColumnToContents ( 0 );
388
- QTimer::singleShot ( 0 , mLayerTreeView , &QTreeView::expandAll );
389
384
}
390
385
391
386
void QgsSnappingWidget::modeButtonTriggered ( QAction *action )
0 commit comments