Skip to content

Commit

Permalink
Merge pull request #5657 from DelazJ/patch-2
Browse files Browse the repository at this point in the history
[Bugfix] Snapping widget: Ensure layer column is fully visible
  • Loading branch information
nyalldawson committed Dec 11, 2017
2 parents 163a1f9 + 62bd377 commit 6e18210
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/app/qgssnappingwidget.cpp
Expand Up @@ -197,18 +197,13 @@ QgsSnappingWidget::QgsSnappingWidget( QgsProject *project, QgsMapCanvas *canvas,
QToolButton *topoButton = new QToolButton();
topoButton->addAction( mTopologicalEditingAction );
topoButton->setDefaultAction( mTopologicalEditingAction );
if ( mDisplayMode == Widget )
{
topoButton->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
}
topoButton->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
layout->addWidget( topoButton );

QToolButton *interButton = new QToolButton();
interButton->addAction( mIntersectionSnappingAction );
interButton->setDefaultAction( mIntersectionSnappingAction );
if ( mDisplayMode == Widget )
{
interButton->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
}
interButton->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
layout->addWidget( interButton );

layout->setContentsMargins( 0, 0, 0, 0 );
Expand Down Expand Up @@ -384,8 +379,8 @@ void QgsSnappingWidget::enableIntersectionSnapping( bool enabled )

void QgsSnappingWidget::onSnappingTreeLayersChanged()
{
mLayerTreeView->expandAll();
mLayerTreeView->resizeColumnToContents( 0 );
QTimer::singleShot( 0, mLayerTreeView, &QTreeView::expandAll );
}

void QgsSnappingWidget::modeButtonTriggered( QAction *action )
Expand Down

0 comments on commit 6e18210

Please sign in to comment.