Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensure report dock is visible when opening a report designer
  • Loading branch information
nyalldawson committed Jan 5, 2018
1 parent eae4eeb commit a4f854e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
27 changes: 10 additions & 17 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -675,7 +675,7 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
addDockWidget( Qt::RightDockWidgetArea, mUndoDock );
addDockWidget( Qt::RightDockWidgetArea, mItemsDock );
addDockWidget( Qt::RightDockWidgetArea, mAtlasDock );
addDockWidget( Qt::RightDockWidgetArea, mReportDock );
addDockWidget( Qt::LeftDockWidgetArea, mReportDock );

createLayoutPropertiesWidget();

Expand Down Expand Up @@ -914,6 +914,13 @@ void QgsLayoutDesignerDialog::open()
{
mView->zoomFull(); // zoomFull() does not work properly until we have called show()
}

if ( mMasterLayout && mMasterLayout->layoutType() == QgsMasterLayoutInterface::Report )
{
mReportDock->show();
mReportDock->raise();
mReportDock->setUserVisible( true );
}
}

void QgsLayoutDesignerDialog::activate()
Expand Down Expand Up @@ -1990,12 +1997,7 @@ void QgsLayoutDesignerDialog::showAtlasSettings()
if ( !mAtlasDock )
return;

if ( !mAtlasDock->isVisible() )
{
mAtlasDock->show();
}

mAtlasDock->raise();
mAtlasDock->setUserVisible( true );
}

void QgsLayoutDesignerDialog::atlasPreviewTriggered( bool checked )
Expand Down Expand Up @@ -3277,12 +3279,7 @@ void QgsLayoutDesignerDialog::showReportSettings()
if ( !mReportDock )
return;

if ( !mReportDock->isVisible() )
{
mReportDock->show();
}

mReportDock->raise();
mReportDock->setUserVisible( true );
}

void QgsLayoutDesignerDialog::pageSetup()
Expand Down Expand Up @@ -3435,11 +3432,7 @@ void QgsLayoutDesignerDialog::createReportWidget()
QgsReportOrganizerWidget *reportWidget = new QgsReportOrganizerWidget( mReportDock, this, report );
reportWidget->setMessageBar( mMessageBar );
mReportDock->setWidget( reportWidget );
mReportDock->show();
mReportDock->raise();

mReportToolbar->show();

mPanelsMenu->addAction( mReportDock->toggleViewAction() );
}

Expand Down
3 changes: 0 additions & 3 deletions src/gui/qgsdockwidget.cpp
Expand Up @@ -35,9 +35,6 @@ void QgsDockWidget::setUserVisible( bool visible )
{
if ( visible )
{
if ( mVisibleAndActive )
return;

show();
raise();
}
Expand Down

0 comments on commit a4f854e

Please sign in to comment.