From db382d614922b20be790ff4c725f96db8f5ba816 Mon Sep 17 00:00:00 2001 From: Mathieu Labbe Date: Wed, 7 Jan 2015 17:51:15 -0500 Subject: [PATCH] removed milliseconds from saved file name, fixed reset all settings of childrend of a groupbox which is also a prameter --- guilib/src/MainWindow.cpp | 2 +- guilib/src/PreferencesDialog.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index beec88c4..cfe073ac 100644 --- a/guilib/src/MainWindow.cpp +++ b/guilib/src/MainWindow.cpp @@ -1588,7 +1588,7 @@ void MainWindow::processRtabmapEventInit(int status, const QString & info) !_emptyNewDatabase) { // Temp database used, automatically backup with unique name (timestamp) - QString newName = QDateTime::currentDateTime().toString("yyMMdd-hhmmsszzz"); + QString newName = QDateTime::currentDateTime().toString("yyMMdd-hhmmss"); bool ok = false; newName = QInputDialog::getText(this, tr("Saving database..."), tr("Database name:"), QLineEdit::Normal, newName, &ok); while(ok) diff --git a/guilib/src/PreferencesDialog.cpp b/guilib/src/PreferencesDialog.cpp index 76a9a9e4..0e8cafaa 100644 --- a/guilib/src/PreferencesDialog.cpp +++ b/guilib/src/PreferencesDialog.cpp @@ -925,6 +925,10 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox) if(uContains(defaults, key)) { this->setParameter(key, defaults.at(key)); + if(qobject_cast(children.at(i))) + { + this->resetSettings((QGroupBox*)children.at(i)); + } } else if(qobject_cast(children.at(i))) {