summaryrefslogtreecommitdiffstats
path: root/src/mixer/playermanager.cpp
diff options
context:
space:
mode:
authorronso0 <ronso0@mixxx.org>2019-06-27 17:32:39 +0200
committerronso0 <ronso0@mixxx.org>2019-06-27 17:32:39 +0200
commita8a41f50d52eb7b670d6db0cc2bafaf59baf00b2 (patch)
tree6abaf6d96c39b9c21c0b43ea4b643a6524c56ac9 /src/mixer/playermanager.cpp
parent6cf252f4dec5637d7fcb19d42b075d02840f0534 (diff)
simplify reading &/ setting the default of bool cloneOnDoubleTap
Diffstat (limited to 'src/mixer/playermanager.cpp')
-rw-r--r--src/mixer/playermanager.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mixer/playermanager.cpp b/src/mixer/playermanager.cpp
index 43b6ea774c..1d0e7cdf08 100644
--- a/src/mixer/playermanager.cpp
+++ b/src/mixer/playermanager.cpp
@@ -580,15 +580,9 @@ void PlayerManager::slotLoadTrackToPlayer(TrackPointer pTrack, QString group, bo
}
mixxx::Duration elapsed = m_cloneTimer.restart();
- bool cloneOnDoubleTap;
// If not present in the config, use & set the default value
- if (!m_pConfig->exists(ConfigKey("[Controls]","CloneDeckOnLoadDoubleTap"))) {
- cloneOnDoubleTap = true;
- m_pConfig->setValue(ConfigKey("[Controls]", "CloneDeckOnLoadDoubleTap"), true);
- } else {
- cloneOnDoubleTap = m_pConfig->getValue<bool>(
- ConfigKey("[Controls]", "CloneDeckOnLoadDoubleTap"));
- };
+ bool cloneOnDoubleTap = m_pConfig->getValue(
+ ConfigKey("[Controls]", "CloneDeckOnLoadDoubleTap"), true);
if (cloneOnDoubleTap && m_lastLoadedPlayer == group && elapsed < mixxx::Duration::fromSeconds(0.5)) {
// load was pressed twice quickly while [Controls],CloneDeckOnLoadDoubleTap is TRUE,
// so clone another playing deck instead of loading the selected track