summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-04-21 18:29:06 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-04-21 18:29:06 +0200
commitd46975bf766e8b7d81fbc17b804724a426918cca (patch)
treed5c975eb3655e1b4d1a97de765c9f69fb60f9e50 /plugingui
parenta96587e4737ea617188f13370331072322adb0ad (diff)
Fix reload logic.
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/diskstreamingframecontent.cc7
-rw-r--r--plugingui/diskstreamingframecontent.h1
-rw-r--r--plugingui/drumkitframecontent.cc1
3 files changed, 8 insertions, 1 deletions
diff --git a/plugingui/diskstreamingframecontent.cc b/plugingui/diskstreamingframecontent.cc
index 87e8b8b..33367de 100644
--- a/plugingui/diskstreamingframecontent.cc
+++ b/plugingui/diskstreamingframecontent.cc
@@ -59,6 +59,9 @@ DiskstreamingframeContent::DiskstreamingframeContent(Widget* parent,
CONNECT(&button, clickNotifier,
this, &DiskstreamingframeContent::reloadClicked);
+ CONNECT(this, settings_notifier.reload_counter,
+ this, &DiskstreamingframeContent::reloaded);
+
// TODO:
// CONNECT(this, settings_notifier.disk_cache_chunk_size,
// this, &DGWindow::chunkSettingsValueChanged);
@@ -118,9 +121,11 @@ void DiskstreamingframeContent::limitValueChanged(float value)
void DiskstreamingframeContent::reloadClicked()
{
settings.reload_counter++;
+}
+void DiskstreamingframeContent::reloaded(std::size_t)
+{
button.setEnabled(false);
}
-
} // GUI::
diff --git a/plugingui/diskstreamingframecontent.h b/plugingui/diskstreamingframecontent.h
index bc26806..0f9a098 100644
--- a/plugingui/diskstreamingframecontent.h
+++ b/plugingui/diskstreamingframecontent.h
@@ -51,6 +51,7 @@ private:
void limitSettingsValueChanged(std::size_t value);
void limitValueChanged(float value);
void reloadClicked();
+ void reloaded(std::size_t);
// For now the maximum disk streaming limit is 4GB
static constexpr std::size_t min_limit = 1024.0 * 1024.0 * 32;
diff --git a/plugingui/drumkitframecontent.cc b/plugingui/drumkitframecontent.cc
index fc0b120..3752cc3 100644
--- a/plugingui/drumkitframecontent.cc
+++ b/plugingui/drumkitframecontent.cc
@@ -189,6 +189,7 @@ void DrumkitframeContent::selectKitFile(const std::string& filename)
config.save();
settings.drumkit_file.store(filename);
+ settings.reload_counter++;
}
void DrumkitframeContent::selectMapFile(const std::string& filename)