mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 05:53:29 +02:00
OK, I found the problem: duplication of state for the "autosave" option.
Let's just use the QAction, as does everything else.
This commit is contained in:
parent
9da10df9f2
commit
75c89f2c22
2 changed files with 3 additions and 10 deletions
|
@ -215,7 +215,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
|||
|
||||
_window->setCentralWidget(_glWidget);
|
||||
|
||||
// these are used, for example, to identify the application's preferences
|
||||
// these are used, for example, to identify the application settings
|
||||
setApplicationName("Interface");
|
||||
setOrganizationDomain("highfidelity.io");
|
||||
setOrganizationName("High Fidelity");
|
||||
|
@ -968,7 +968,7 @@ void Application::terminate() {
|
|||
// Close serial port
|
||||
// close(serial_fd);
|
||||
|
||||
if (_autosave) {
|
||||
if (_settingsAutosave->isChecked()) {
|
||||
saveSettings();
|
||||
_settings->sync();
|
||||
}
|
||||
|
@ -1471,7 +1471,7 @@ void Application::initMenu() {
|
|||
debugMenu->addAction("Wants View Delta Sending", this, SLOT(setWantsDelta(bool)))->setCheckable(true);
|
||||
|
||||
QMenu* settingsMenu = menuBar->addMenu("Settings");
|
||||
(_settingsAutosave = settingsMenu->addAction("Autosave", this, SLOT(setAutosave(bool))))->setCheckable(true);
|
||||
(_settingsAutosave = settingsMenu->addAction("Autosave"))->setCheckable(true);
|
||||
_settingsAutosave->setChecked(true);
|
||||
settingsMenu->addAction("Load settings", this, SLOT(loadSettings()));
|
||||
settingsMenu->addAction("Save settings", this, SLOT(saveSettings()));
|
||||
|
@ -2521,10 +2521,6 @@ void Application::saveAction(QSettings* set, QAction* action) {
|
|||
set->setValue(action->text(), action->isChecked());
|
||||
}
|
||||
|
||||
void Application::setAutosave(bool wantsAutosave) {
|
||||
_autosave = wantsAutosave;
|
||||
}
|
||||
|
||||
void Application::loadSettings(QSettings* set) {
|
||||
if (!set) set = getSettings();
|
||||
|
||||
|
|
|
@ -112,7 +112,6 @@ private slots:
|
|||
void decreaseVoxelSize();
|
||||
void increaseVoxelSize();
|
||||
void chooseVoxelPaintColor();
|
||||
void setAutosave(bool wantsAutosave);
|
||||
void loadSettings(QSettings* set = NULL);
|
||||
void saveSettings(QSettings* set = NULL);
|
||||
void importSettings();
|
||||
|
@ -293,8 +292,6 @@ private:
|
|||
int _packetsPerSecond;
|
||||
int _bytesPerSecond;
|
||||
int _bytesCount;
|
||||
|
||||
bool _autosave; // True if the autosave is on.
|
||||
};
|
||||
|
||||
#endif /* defined(__interface__Application__) */
|
||||
|
|
Loading…
Reference in a new issue