@@ -269,6 +269,16 @@ void FredView::setEditor(Editor* editor, EditorViewport* viewport) {
269269 restoreGeometry (savedGeometry);
270270 enforceSideDockAreas ();
271271
272+ // Keep the context bar on its own row below the primary toolbar.
273+ // restoreState() can otherwise place or hide toolbars based on saved layout.
274+ removeToolBar (ui->toolBar );
275+ removeToolBar (ui->contextToolBar );
276+ addToolBar (Qt::TopToolBarArea, ui->toolBar );
277+ addToolBarBreak (Qt::TopToolBarArea);
278+ addToolBar (Qt::TopToolBarArea, ui->contextToolBar );
279+ ui->toolBar ->setVisible (true );
280+ ui->contextToolBar ->setVisible (true );
281+
272282 // Lock the context toolbar to a fixed height so that adding/removing buttons
273283 // doesn't resize the viewport. Use the primary toolbar's hint; fall back to 28px.
274284 _contextToolBar->setFixedHeight (qMax (28 , ui->toolBar ->sizeHint ().height ()));
@@ -783,6 +793,8 @@ void FredView::initializeStatusBar() {
783793
784794void FredView::initializeContextToolbar () {
785795 _contextToolBar = ui->contextToolBar ;
796+ _contextToolBar->setContextMenuPolicy (Qt::PreventContextMenu);
797+ _contextToolBar->setVisible (true );
786798
787799 _contextLabel = new QLabel (tr (" No Selection" ), _contextToolBar);
788800 _contextLabel->setContentsMargins (6 , 0 , 8 , 0 );
@@ -968,6 +980,8 @@ void FredView::quickRenameCurrentObject() {
968980
969981void FredView::initializeTransformBar () {
970982 _transformToolBar = ui->transformToolBar ;
983+ _transformToolBar->setContextMenuPolicy (Qt::PreventContextMenu);
984+ _transformToolBar->setVisible (true );
971985
972986 // Helper: add a fixed-width spacer widget to the toolbar.
973987 auto addFixedSpacer = [this ](int w) {
0 commit comments