diff --git a/src/app/layout/qgslayoutdesignerdialog.cpp b/src/app/layout/qgslayoutdesignerdialog.cpp index 6cfc385dac8..5e8518c465c 100644 --- a/src/app/layout/qgslayoutdesignerdialog.cpp +++ b/src/app/layout/qgslayoutdesignerdialog.cpp @@ -659,9 +659,11 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla mAtlasDock = new QgsDockWidget( tr( "Atlas" ), this ); mAtlasDock->setObjectName( QStringLiteral( "AtlasDock" ) ); + connect( mAtlasDock, &QDockWidget::visibilityChanged, mActionAtlasSettings, &QAction::setChecked ); mReportDock = new QgsDockWidget( tr( "Report" ), this ); mReportDock->setObjectName( QStringLiteral( "ReportDock" ) ); + connect( mReportDock, &QDockWidget::visibilityChanged, mActionReportSettings, &QAction::setChecked ); const QList docks = findChildren(); for ( QDockWidget *dock : docks ) @@ -1992,12 +1994,12 @@ void QgsLayoutDesignerDialog::exportToSvg() QApplication::restoreOverrideCursor(); } -void QgsLayoutDesignerDialog::showAtlasSettings() +void QgsLayoutDesignerDialog::showAtlasSettings( bool checked ) { if ( !mAtlasDock ) return; - mAtlasDock->setUserVisible( true ); + mAtlasDock->setUserVisible( checked ); } void QgsLayoutDesignerDialog::atlasPreviewTriggered( bool checked ) @@ -3274,12 +3276,12 @@ void QgsLayoutDesignerDialog::printReport() QApplication::restoreOverrideCursor(); } -void QgsLayoutDesignerDialog::showReportSettings() +void QgsLayoutDesignerDialog::showReportSettings( bool checked ) { if ( !mReportDock ) return; - mReportDock->setUserVisible( true ); + mReportDock->setUserVisible( checked ); } void QgsLayoutDesignerDialog::pageSetup() diff --git a/src/app/layout/qgslayoutdesignerdialog.h b/src/app/layout/qgslayoutdesignerdialog.h index 9b47f3c5106..6b490e3b2ef 100644 --- a/src/app/layout/qgslayoutdesignerdialog.h +++ b/src/app/layout/qgslayoutdesignerdialog.h @@ -309,7 +309,7 @@ class QgsLayoutDesignerDialog: public QMainWindow, private Ui::QgsLayoutDesigner void exportToRaster(); void exportToPdf(); void exportToSvg(); - void showAtlasSettings(); + void showAtlasSettings( bool checked ); void atlasPreviewTriggered( bool checked ); void atlasPageComboEditingFinished(); void atlasNext(); @@ -325,7 +325,7 @@ class QgsLayoutDesignerDialog: public QMainWindow, private Ui::QgsLayoutDesigner void exportReportToSvg(); void exportReportToPdf(); void printReport(); - void showReportSettings(); + void showReportSettings( bool checked ); void pageSetup(); diff --git a/src/ui/layout/qgslayoutdesignerbase.ui b/src/ui/layout/qgslayoutdesignerbase.ui index 396ae5425f6..fff12d65b64 100644 --- a/src/ui/layout/qgslayoutdesignerbase.ui +++ b/src/ui/layout/qgslayoutdesignerbase.ui @@ -99,7 +99,7 @@ 0 0 2180 - 42 + 25 @@ -1369,6 +1369,9 @@ + + true + :/images/themes/default/mActionAtlasSettings.svg:/images/themes/default/mActionAtlasSettings.svg @@ -1429,6 +1432,9 @@ + + true + :/images/themes/default/mActionAtlasSettings.svg:/images/themes/default/mActionAtlasSettings.svg @@ -1510,6 +1516,7 @@ +