Commit 6b9c621c authored by Jan Möbius's avatar Jan Möbius

Always add the main and viewer toolbar in view modes

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8779 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6659008a
...@@ -109,6 +109,8 @@ void CoreWidget::slotAddViewModeToolboxes(QString _mode, bool _custom, QStringLi ...@@ -109,6 +109,8 @@ void CoreWidget::slotAddViewModeToolboxes(QString _mode, bool _custom, QStringLi
vm->custom = _custom; vm->custom = _custom;
vm->icon = "Unknown.png"; vm->icon = "Unknown.png";
vm->visibleToolbars = QString("Main Toolbar;Viewer Toolbar").split(";");
if (_custom) { if (_custom) {
viewModes_.push_back(vm); viewModes_.push_back(vm);
} else { } else {
...@@ -121,6 +123,7 @@ void CoreWidget::slotAddViewModeToolboxes(QString _mode, bool _custom, QStringLi ...@@ -121,6 +123,7 @@ void CoreWidget::slotAddViewModeToolboxes(QString _mode, bool _custom, QStringLi
} }
viewModes_.insert(i,vm); viewModes_.insert(i,vm);
} }
} else { } else {
vm = viewModes_[id]; vm = viewModes_[id];
} }
...@@ -167,7 +170,15 @@ void CoreWidget::slotAddViewModeToolbars(QString _mode, bool _custom, QStringLis ...@@ -167,7 +170,15 @@ void CoreWidget::slotAddViewModeToolbars(QString _mode, bool _custom, QStringLis
} else { } else {
vm = viewModes_[id]; vm = viewModes_[id];
} }
// Always add the viewer Toolbar
if ( ! _usedToolbars.contains("Viewer Toolbar") )
_usedToolbars.prepend("Viewer Toolbar");
// Always add the main Toolbar
if ( ! _usedToolbars.contains("Main Toolbar") )
_usedToolbars.prepend("Main Toolbar");
vm->visibleToolbars = _usedToolbars; vm->visibleToolbars = _usedToolbars;
initViewModes(); initViewModes();
...@@ -296,7 +307,7 @@ void CoreWidget::slotChangeView(QString _mode, QStringList _toolboxWidgets, QStr ...@@ -296,7 +307,7 @@ void CoreWidget::slotChangeView(QString _mode, QStringList _toolboxWidgets, QStr
_toolboxWidgets = viewModes_[i]->visibleToolboxes; _toolboxWidgets = viewModes_[i]->visibleToolboxes;
_toolbars = viewModes_[i]->visibleToolbars; _toolbars = viewModes_[i]->visibleToolbars;
} }
// Remove all toolbox entries // Remove all toolbox entries
toolBox_->clear (); toolBox_->clear ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment