mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
OP-1194 minor cleanups to scope gadget state persistence handling
This commit is contained in:
parent
cdeebeebb4
commit
9e16e8f6a9
@ -138,7 +138,7 @@ void UAVGadgetDecorator::restoreState(QSettings *qSettings)
|
||||
break;
|
||||
}
|
||||
}
|
||||
// store gadget individual state
|
||||
// restore gadget individual state
|
||||
qSettings->beginGroup("state");
|
||||
m_gadget->restoreState(qSettings);
|
||||
qSettings->endGroup();
|
||||
|
@ -1,22 +1,30 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = ScopeGadget
|
||||
|
||||
DEFINES += SCOPE_LIBRARY
|
||||
|
||||
include(../../openpilotgcsplugin.pri)
|
||||
include (scope_dependencies.pri)
|
||||
HEADERS += scopeplugin.h \
|
||||
|
||||
HEADERS += \
|
||||
scopeplugin.h \
|
||||
plotdata.h \
|
||||
scope_global.h
|
||||
HEADERS += scopegadgetoptionspage.h
|
||||
HEADERS += scopegadgetconfiguration.h
|
||||
HEADERS += scopegadget.h
|
||||
HEADERS += scopegadgetwidget.h
|
||||
HEADERS += scopegadgetfactory.h
|
||||
SOURCES += scopeplugin.cpp \
|
||||
plotdata.cpp
|
||||
SOURCES += scopegadgetoptionspage.cpp
|
||||
SOURCES += scopegadgetconfiguration.cpp
|
||||
SOURCES += scopegadget.cpp
|
||||
SOURCES += scopegadgetfactory.cpp
|
||||
SOURCES += scopegadgetwidget.cpp
|
||||
scope_global.h \
|
||||
scopegadgetoptionspage.h \
|
||||
scopegadgetconfiguration.h \
|
||||
scopegadget.h \
|
||||
scopegadgetwidget.h \
|
||||
scopegadgetfactory.h
|
||||
|
||||
SOURCES += \
|
||||
scopeplugin.cpp \
|
||||
plotdata.cpp \
|
||||
scopegadgetoptionspage.cpp \
|
||||
scopegadgetconfiguration.cpp \
|
||||
scopegadget.cpp \
|
||||
scopegadgetfactory.cpp \
|
||||
scopegadgetwidget.cpp
|
||||
|
||||
OTHER_FILES += ScopeGadget.pluginspec
|
||||
|
||||
FORMS += scopegadgetoptionspage.ui
|
||||
|
@ -520,7 +520,10 @@ void ScopeGadgetWidget::saveState(QSettings *qSettings)
|
||||
int i = 1;
|
||||
|
||||
foreach(PlotData * plotData, m_curvesData.values()) {
|
||||
qSettings->setValue(QString("plot%1").arg(i), plotData->curve->isVisible());
|
||||
bool plotVisible = plotData->curve->isVisible();
|
||||
if (!plotVisible) {
|
||||
qSettings->setValue(QString("plot%1").arg(i), plotVisible);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
// legend state
|
||||
|
Loading…
Reference in New Issue
Block a user