summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-17 23:50:51 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-17 23:51:14 +0200
commit93d6e7a6b8d135365a0f073098ba97f905d2c550 (patch)
treeaae77f89c09521b1d2e19dd2ad00ea28299a0581 /gui
parent1a7b39fcd77ee82450d591357ea336f956d49734 (diff)
options: support deferred writes when saving bundles
The mapping window has 13 bundles total in use. Setting them all can take up to a large fraction of a second on some windows filesystems. Do a single config write instead.
Diffstat (limited to 'gui')
-rw-r--r--gui/mapping-window.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/gui/mapping-window.cpp b/gui/mapping-window.cpp
index 96469e65..47e12c31 100644
--- a/gui/mapping-window.cpp
+++ b/gui/mapping-window.cpp
@@ -89,15 +89,18 @@ void MapWidget::closeEvent(QCloseEvent*)
void MapWidget::save_dialog()
{
- s.b_map->save();
+ mem<QSettings> settings_ = group::ini_file();
+ QSettings& settings = *settings_;
+
+ s.b_map->save_deferred(settings);
for (int i = 0; i < 6; i++)
{
m.forall([&](Map& s)
{
- s.spline_main.save();
- s.spline_alt.save();
- s.opts.b_mapping_window->save();
+ s.spline_main.save(settings);
+ s.spline_alt.save(settings);
+ s.opts.b_mapping_window->save_deferred(settings);
});
}
}