Skip to content

Commit

Permalink
Don't show the layer order checkbox on legend, only on layer order pa…
Browse files Browse the repository at this point in the history
…nel. Greetings from QGIS Hackfest in Essen
  • Loading branch information
timlinux committed Oct 3, 2012
1 parent 14b87d5 commit f9f5448
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit f9f5448

Please sign in to comment.