Skip to content

Commit

Permalink
Allow better resizing of Projection selector widget tree
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ committed Nov 18, 2017
1 parent af6b4cc commit 62bd377
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 62bd377

Please sign in to comment.