Skip to content
Permalink
Browse files

Allow better resizing of Projection selector widget tree

  • Loading branch information
DelazJ committed Nov 18, 2017
1 parent af6b4cc commit 62bd37762dd619e5d5c527e7c793fa801de8a410
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 62bd377

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