Skip to content
Permalink
Browse files

Don't show the layer order checkbox on legend, only on layer order pa…

…nel. Greetings from QGIS Hackfest in Essen
  • Loading branch information
timlinux committed Oct 3, 2012
1 parent 14b87d5 commit f9f5448c9f0dd0c8a723b0d343f2fe37e05f7cb5
Showing with 0 additions and 6 deletions.
  1. +0 −6 src/app/qgisapp.cpp
@@ -1955,22 +1955,16 @@ void QgisApp::initLegend()
mLegendDock->setObjectName( "Legend" );
mLegendDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );

QCheckBox *legendCb = new QCheckBox( tr( "Control rendering order" ) );
legendCb->setChecked( true );

QCheckBox *orderCb = new QCheckBox( tr( "Control rendering order" ) );
orderCb->setChecked( false );

connect( legendCb, SIGNAL( toggled( bool ) ), mMapLegend, SLOT( setUpdateDrawingOrder( bool ) ) );
connect( orderCb, SIGNAL( toggled( bool ) ), mMapLegend, SLOT( unsetUpdateDrawingOrder( bool ) ) );
connect( mMapLegend, SIGNAL( updateDrawingOrderChecked( bool ) ), legendCb, SLOT( setChecked( bool ) ) );
connect( mMapLegend, SIGNAL( updateDrawingOrderUnchecked( bool ) ), orderCb, SLOT( setChecked( bool ) ) );

QWidget *w = new QWidget( this );
QLayout *l = new QVBoxLayout;
l->setMargin( 0 );
l->addWidget( mMapLegend );
l->addWidget( legendCb );
w->setLayout( l );
mLegendDock->setWidget( w );
addDockWidget( Qt::LeftDockWidgetArea, mLegendDock );

0 comments on commit f9f5448

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