File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -793,6 +793,11 @@ QMenu *QgsLayoutDesignerDialog::createPopupMenu()
793
793
menu->addAction ( panelstitle );
794
794
Q_FOREACH ( QAction *a, panels )
795
795
{
796
+ if ( ( a == mAtlasDock ->toggleViewAction () && !dynamic_cast < QgsPrintLayout * >( mMasterLayout ) ) ||
797
+ ( a == mReportDock ->toggleViewAction () && !dynamic_cast < QgsReport * >( mMasterLayout ) ) )
798
+ {
799
+ a->setVisible ( false );
800
+ }
796
801
menu->addAction ( a );
797
802
}
798
803
menu->addSeparator ();
@@ -805,6 +810,11 @@ QMenu *QgsLayoutDesignerDialog::createPopupMenu()
805
810
std::sort ( toolbars.begin (), toolbars.end (), cmpByText_ );
806
811
Q_FOREACH ( QAction *a, toolbars )
807
812
{
813
+ if ( ( a == mAtlasToolbar ->toggleViewAction () && !dynamic_cast < QgsPrintLayout * >( mMasterLayout ) ) ||
814
+ ( a == mReportToolbar ->toggleViewAction () && !dynamic_cast < QgsReport * >( mMasterLayout ) ) )
815
+ {
816
+ a->setVisible ( false );
817
+ }
808
818
menu->addAction ( a );
809
819
}
810
820
}
@@ -851,6 +861,7 @@ void QgsLayoutDesignerDialog::setMasterLayout( QgsMasterLayoutInterface *layout
851
861
delete mMenuAtlas ;
852
862
mMenuAtlas = nullptr ;
853
863
mAtlasToolbar ->hide ();
864
+ mToolbarMenu ->removeAction ( mAtlasToolbar ->toggleViewAction () );
854
865
}
855
866
856
867
if ( dynamic_cast < QgsReport * >( layout ) )
@@ -867,6 +878,7 @@ void QgsLayoutDesignerDialog::setMasterLayout( QgsMasterLayoutInterface *layout
867
878
delete mMenuReport ;
868
879
mMenuReport = nullptr ;
869
880
mReportToolbar ->hide ();
881
+ mToolbarMenu ->removeAction ( mReportToolbar ->toggleViewAction () );
870
882
}
871
883
872
884
updateActionNames ( mMasterLayout ->layoutType () );
You can’t perform that action at this time.
0 commit comments