summaryrefslogtreecommitdiffhomepage
path: root/spline-widget/functionconfig.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-06-12 18:32:49 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-06-14 18:14:46 +0200
commit0c029da344b45154d4c68debe127d8cdf3843751 (patch)
treec760accf448eb4d9d8eadd30f43051b3a228c10e /spline-widget/functionconfig.h
parent251d2c45a37da6fed01c1f37529c3cd899b434e6 (diff)
gui, spline-widget, compat/options: ensure no qsettings IO when not modified
Turns out every MainWindow::save() and friends were doing useless IO several times during each save. I blame the bundle abstraction. For bundles we track the modified state, but the spline widget needs equality check since it doesn't use the options api. It was found by accident when adding qDebug() into the slider_value {de,}serializer code. The .ini file was being rewritten over and over again causing hundres of milliseconds pauses on Windows. Remove the save timer kludge from gui. Saves are now fast.
Diffstat (limited to 'spline-widget/functionconfig.h')
-rw-r--r--spline-widget/functionconfig.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/spline-widget/functionconfig.h b/spline-widget/functionconfig.h
index 6c039831..5c9eeb2b 100644
--- a/spline-widget/functionconfig.h
+++ b/spline-widget/functionconfig.h
@@ -28,9 +28,11 @@ class SPLINE_WIDGET_EXPORT Map {
private:
static constexpr int value_count = 10000;
- struct State {
+ struct State
+ {
QList<QPointF> input;
std::vector<float> data;
+ bool operator==(const State& s) const;
};
int precision() const;