Commit 44d148df authored by Lorenz Meier's avatar Lorenz Meier

Main widget menu redundancy removed

parent 036c883d
......@@ -836,16 +836,16 @@ void MainWindow::addCentralWidget(QWidget* widget, const QString& title)
{
centerStack->addWidget(widget);
QAction* tempAction = ui.menuMain->addAction(title);
tempAction->setCheckable(true);
QVariant var;
var.setValue((QWidget*)widget);
tempAction->setData(var);
centerStackActionGroup->addAction(tempAction);
connect(tempAction,SIGNAL(triggered()),this, SLOT(showCentralWidget()));
// QAction* tempAction = ui.menuMain->addAction(title);
// tempAction->setCheckable(true);
// QVariant var;
// var.setValue((QWidget*)widget);
// tempAction->setData(var);
// centerStackActionGroup->addAction(tempAction);
// connect(tempAction,SIGNAL(triggered()),this, SLOT(showCentralWidget()));
//connect(widget, SIGNAL(visibilityChanged(bool)), tempAction, SLOT(setChecked(bool)));
tempAction->setChecked(widget->isVisible());
// tempAction->setChecked(widget->isVisible());
}
}
......
......@@ -115,15 +115,9 @@
<addaction name="actionFullscreen"/>
<addaction name="actionNormal"/>
</widget>
<widget class="QMenu" name="menuMain">
<property name="title">
<string>Main Widget</string>
</property>
</widget>
<addaction name="menuMGround"/>
<addaction name="menuNetwork"/>
<addaction name="menuPerspectives"/>
<addaction name="menuMain"/>
<addaction name="menuTools"/>
<addaction name="menuHelp"/>
</widget>
......
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