Skip to content

Commit a4f854e

Browse files
committed
Ensure report dock is visible when opening a report designer
1 parent eae4eeb commit a4f854e

2 files changed

Lines changed: 10 additions & 20 deletions

File tree

src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
675675
addDockWidget( Qt::RightDockWidgetArea, mUndoDock );
676676
addDockWidget( Qt::RightDockWidgetArea, mItemsDock );
677677
addDockWidget( Qt::RightDockWidgetArea, mAtlasDock );
678-
addDockWidget( Qt::RightDockWidgetArea, mReportDock );
678+
addDockWidget( Qt::LeftDockWidgetArea, mReportDock );
679679

680680
createLayoutPropertiesWidget();
681681

@@ -914,6 +914,13 @@ void QgsLayoutDesignerDialog::open()
914914
{
915915
mView->zoomFull(); // zoomFull() does not work properly until we have called show()
916916
}
917+
918+
if ( mMasterLayout && mMasterLayout->layoutType() == QgsMasterLayoutInterface::Report )
919+
{
920+
mReportDock->show();
921+
mReportDock->raise();
922+
mReportDock->setUserVisible( true );
923+
}
917924
}
918925

919926
void QgsLayoutDesignerDialog::activate()
@@ -1990,12 +1997,7 @@ void QgsLayoutDesignerDialog::showAtlasSettings()
19901997
if ( !mAtlasDock )
19911998
return;
19921999

1993-
if ( !mAtlasDock->isVisible() )
1994-
{
1995-
mAtlasDock->show();
1996-
}
1997-
1998-
mAtlasDock->raise();
2000+
mAtlasDock->setUserVisible( true );
19992001
}
20002002

20012003
void QgsLayoutDesignerDialog::atlasPreviewTriggered( bool checked )
@@ -3277,12 +3279,7 @@ void QgsLayoutDesignerDialog::showReportSettings()
32773279
if ( !mReportDock )
32783280
return;
32793281

3280-
if ( !mReportDock->isVisible() )
3281-
{
3282-
mReportDock->show();
3283-
}
3284-
3285-
mReportDock->raise();
3282+
mReportDock->setUserVisible( true );
32863283
}
32873284

32883285
void QgsLayoutDesignerDialog::pageSetup()
@@ -3435,11 +3432,7 @@ void QgsLayoutDesignerDialog::createReportWidget()
34353432
QgsReportOrganizerWidget *reportWidget = new QgsReportOrganizerWidget( mReportDock, this, report );
34363433
reportWidget->setMessageBar( mMessageBar );
34373434
mReportDock->setWidget( reportWidget );
3438-
mReportDock->show();
3439-
mReportDock->raise();
3440-
34413435
mReportToolbar->show();
3442-
34433436
mPanelsMenu->addAction( mReportDock->toggleViewAction() );
34443437
}
34453438

src/gui/qgsdockwidget.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ void QgsDockWidget::setUserVisible( bool visible )
3535
{
3636
if ( visible )
3737
{
38-
if ( mVisibleAndActive )
39-
return;
40-
4138
show();
4239
raise();
4340
}

0 commit comments

Comments
 (0)