Skip to content
Permalink
Browse files

Merge pull request #5657 from DelazJ/patch-2

[Bugfix] Snapping widget: Ensure layer column is fully visible
  • Loading branch information
nyalldawson committed Dec 11, 2017
2 parents 163a1f9 + 62bd377 commit 6e182107d7adc89f1750975c78216a08dedbe523
Showing with 4 additions and 9 deletions.
  1. +4 −9 src/app/qgssnappingwidget.cpp
@@ -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 );
@@ -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 )

0 comments on commit 6e18210

Please sign in to comment.
You can’t perform that action at this time.