Commit c60ac6bb authored by Jan Möbius's avatar Jan Möbius

Fixed Bug not showing Toolbars on startup

Removed Debug output

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7275 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6f346dc7
......@@ -81,11 +81,11 @@ void CoreWidget::slotAddToolbar(QToolBar* _toolbar) {
}
}
if ( id == -1 ) {
std::cerr << "Unknown sender plugin when adding Toolbar!" << std::endl;
// This only happens when the core adds a Toolbar
if ( id == -1 )
return;
}
}
for ( uint i = 0 ; i < toolbars_.size(); ++i ) {
......
......@@ -226,10 +226,12 @@ void CoreWidget::slotViewModeDialog(){
void CoreWidget::slotChangeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars ){
//try to find Widgets if they aren't given
if (_mode != "" && _toolboxWidgets.size() == 0)
if (_mode != "" && _toolboxWidgets.size() == 0 && _toolbars.size() == 0)
for (int i=0; i < viewModes_.size(); i++)
if (viewModes_[i]->name == _mode)
if (viewModes_[i]->name == _mode) {
_toolboxWidgets = viewModes_[i]->visibleToolboxes;
_toolbars = viewModes_[i]->visibleToolbars;
}
// Remove all toolbox entries
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