Skip to content
Permalink
Browse files

[Style dock] Set open button as toggle

  • Loading branch information
NathanW2 committed Apr 20, 2016
1 parent 142ce5e commit 5d0be3147c7e7fc49c53bd31d5aa0334cb06f440
Showing with 7 additions and 5 deletions.
  1. +6 −4 src/app/qgisapp.cpp
  2. +1 −1 src/app/qgisapp.h
@@ -2763,9 +2763,11 @@ void QgisApp::initLayerTreeView()
connect( mLegendExpressionFilterButton, SIGNAL( toggled( bool ) ), this, SLOT( toggleFilterLegendByExpression( bool ) ) );

mActionStyleDock = new QAction( tr( "Map Styling" ), this );
mActionStyleDock->setCheckable( true );
mActionStyleDock->setToolTip( tr( "Open the map styling dock" ) );
mActionStyleDock->setIcon( QgsApplication::getThemeIcon( "propertyicons/symbology.png" ) );
connect( mActionStyleDock, SIGNAL( triggered() ), this, SLOT( mapStyleDock() ) );
connect( mActionStyleDock, SIGNAL( toggled( bool ) ), this, SLOT( mapStyleDock( bool ) ) );
connect( mMapStylingDock, SIGNAL( visibilityChanged(bool) ), mActionStyleDock, SLOT( setChecked(bool) ) );

// expand / collapse tool buttons
QAction* actionExpandAll = new QAction( tr( "Expand All" ), this );
@@ -5487,7 +5489,7 @@ void QgisApp::labeling()
return;
}

mapStyleDock();
mapStyleDock( true );
}

void QgisApp::setMapStyleDockLayer( QgsMapLayer* layer )
@@ -5505,9 +5507,9 @@ void QgisApp::setMapStyleDockLayer( QgsMapLayer* layer )
mMapStyleWidget->setLayer( layer );
}

void QgisApp::mapStyleDock()
void QgisApp::mapStyleDock( bool enabled )
{
mMapStylingDock->show();
mMapStylingDock->setVisible( enabled );
setMapStyleDockLayer( activeLayer() );
}

@@ -1170,7 +1170,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void labeling();

//! shows the map styling dock
void mapStyleDock();
void mapStyleDock(bool enabled);

//! diagrams properties
void diagramProperties();

0 comments on commit 5d0be31

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