Skip to content
Snippets Groups Projects
Commit 922ed4e1 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add Settings::restoreDockWidgetsState

parent 01f0d34b
No related branches found
No related tags found
No related merge requests found
......@@ -114,6 +114,7 @@ namespace gepetto {
void saveState () const;
void restoreState () const;
void restoreDockWidgetsState () const;
private:
void writeRobotFile ();
......
......@@ -275,6 +275,7 @@ namespace gepetto {
actionSearchBar_->addAction(new NodeAction("Attach camera " + osgWidget->objectName() + " to selected node", osgWidget, this));
osgWidget->addAction(actionSearchBar_->showAction());
osgWindows_.append(osgWidget);
settings_->restoreDockWidgetsState ();
}
void MainWindow::openLoadRobotDialog()
......
......@@ -218,6 +218,20 @@ namespace gepetto {
}
}
void Settings::restoreDockWidgetsState () const
{
QSettings settings (QSettings::SystemScope,
QCoreApplication::organizationName (),
getQSettingsFileName (stateConf));
if (settings.status() != QSettings::NoError) {
qDebug () << "Could not restore the dock widget state from" << settings.fileName();
} else {
settings.beginGroup("mainWindow");
mw->restoreState (settings.value("state").toByteArray());
settings.endGroup();
}
}
void Settings::saveState () const
{
QSettings settings (QSettings::SystemScope,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment