Skip to content

Commit

Permalink
When a panel widget opens a new panel, the new panel should inherit
Browse files Browse the repository at this point in the history
the dock mode of the previous panel

(cherry-picked from 01ec0e4)
  • Loading branch information
nyalldawson committed Sep 14, 2016
1 parent a7492f5 commit 1accdda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgspanelwidget.cpp
Expand Up @@ -62,6 +62,9 @@ QgsPanelWidget*QgsPanelWidget::findParentPanel( QWidget* widget )

void QgsPanelWidget::openPanel( QgsPanelWidget* panel )
{
//panel dock mode inherits from this panel
panel->setDockMode( dockMode() );

if ( mDockMode )
{
emit showPanel( panel );
Expand Down
2 changes: 0 additions & 2 deletions src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp
Expand Up @@ -258,7 +258,6 @@ void QgsRuleBasedRendererV2Widget::refineRuleCategoriesGui( const QModelIndexLis
QgsCategorizedSymbolRendererV2Widget* w = new QgsCategorizedSymbolRendererV2Widget( mLayer, mStyle, nullptr );
w->setPanelTitle( tr( "Add categories to rules" ) );
connect( w, SIGNAL( panelAccepted( QgsPanelWidget* ) ), this, SLOT( refineRuleCategoriesAccepted( QgsPanelWidget* ) ) );
w->setDockMode( this->dockMode() );
w->setMapCanvas( mMapCanvas );
openPanel( w );
}
Expand All @@ -269,7 +268,6 @@ void QgsRuleBasedRendererV2Widget::refineRuleRangesGui( const QModelIndexList& )
w->setPanelTitle( tr( "Add ranges to rules" ) );
connect( w, SIGNAL( panelAccepted( QgsPanelWidget* ) ), this, SLOT( refineRuleRangesAccepted( QgsPanelWidget* ) ) );
w->setMapCanvas( mMapCanvas );
w->setDockMode( this->dockMode() );
openPanel( w );
}

Expand Down

0 comments on commit 1accdda

Please sign in to comment.