Skip to content
Permalink
Browse files

Ensure report dock is visible when opening a report designer

  • Loading branch information
nyalldawson committed Jan 5, 2018
1 parent eae4eeb commit a4f854e2c1764bfe44b23be86fa69957824c69b8
Showing with 10 additions and 20 deletions.
  1. +10 −17 src/app/layout/qgslayoutdesignerdialog.cpp
  2. +0 −3 src/gui/qgsdockwidget.cpp
@@ -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();

@@ -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()
@@ -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 )
@@ -3277,12 +3279,7 @@ void QgsLayoutDesignerDialog::showReportSettings()
if ( !mReportDock )
return;

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

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

void QgsLayoutDesignerDialog::pageSetup()
@@ -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() );
}

@@ -35,9 +35,6 @@ void QgsDockWidget::setUserVisible( bool visible )
{
if ( visible )
{
if ( mVisibleAndActive )
return;

show();
raise();
}

0 comments on commit a4f854e

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