-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make deck cloning via Load button optional (opt-out) #2042
Conversation
How about that: An alternative solution would be a not cloning load track Co. |
Clone deck . . [_] Create deck clone when Load is pressed twice
👍
👍
👍 perfect! |
What about removes the duplicate "Clone Deck" from previous string, and also limits the option to MIDI & keyboard buttons (no Load button in skins that could be double-clicked) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Playing with this function I think the original implementation is too hacky.
"LoadSelectedTrack" should do what it is saying, load the selected track.
Currently it load the selected track first and replaces it with the playing track on the second press.
I understand that this could be a desired behavior, but it is up to the mapping to decide what should clone a deck. So I think the cleanest solution would be a dedicated control.
src/mixer/playermanager.cpp
Outdated
@@ -580,8 +580,11 @@ void PlayerManager::slotLoadTrackToPlayer(TrackPointer pTrack, QString group, bo | |||
} | |||
|
|||
mixxx::Duration elapsed = m_cloneTimer.restart(); | |||
if (m_lastLoadedPlayer == group && elapsed < mixxx::Duration::fromSeconds(0.5)) { | |||
// load pressed twice quickly, clone instead of loading | |||
bool cloneOnDoubleTap = m_pConfig->getValue<bool>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should here use the defaut value if the config is missing. There should be a function that allows to set a default as fall back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using the default (off) now.
but shouldn't defaults be set only in dlgprefdeck.cpp?
alright. let's do it here, as well as in dlgprefdeck > reset to defaults only (found the respective TODO there)
@@ -566,6 +586,9 @@ void DlgPrefDeck::slotApply() { | |||
m_pConfig->setValue(ConfigKey("[Controls]", "AllowTrackLoadToPlayingDeck"), | |||
!m_bDisallowTrackLoadToPlayingDeck); | |||
|
|||
m_pConfig->setValue(ConfigKey("[Controls]", "CloneDeckOnLoadDoubleTap"), | |||
m_bCloneDeckOnLoadDoubleTap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not read the checkbox here and omit the m_bCloneDeckOnLoadDoubleTap vairable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because we do it via variables for all the other settings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is maybe we can improve this as well one day. It jumps into my eyes, that the syncing of the checkbox and the variable has no value.
It is OK to merge this as an intermediate solution. A new generic LoadDeck control can be the preferences configurable one if we really need this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments
src/mixer/playermanager.cpp
Outdated
// load pressed twice quickly, clone instead of loading | ||
// If not present in the config, use & set the default value | ||
if (!m_pConfig->exists(ConfigKey("[Controls]","CloneDeckOnLoadDoubleTap"))) { | ||
bool cloneOnDoubleTap = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this variable falls out of scope in line 587
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed it already, waiting for local build because of the ui changes about hotcue colors
@@ -413,6 +425,8 @@ void DlgPrefDeck::slotResetToDefaults() { | |||
// Don't load tracks into playing decks. | |||
checkBoxDisallowLoadToPlayingDeck->setChecked(true); | |||
|
|||
// Clone decks by double-tapping Load button. | |||
checkBoxCloneDeckOnLoadDoubleTap->setChecked(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice to use a constant for the default true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please explain what you mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a anonymous namespace:
contexpr bool kDefaultCloneDeckOnLoad = true;
This helps to set the default value only in one place.
d2634d7
to
7213704
Compare
never again I'll resolve conflicts via the web interface. potentially screws up ui files, have to fix the ui file as there are now duplicate layout cells.. |
fab0079
to
0a3f0cd
Compare
src/mixer/playermanager.cpp
Outdated
@@ -29,6 +29,8 @@ namespace { | |||
|
|||
const mixxx::Logger kLogger("PlayerManager"); | |||
|
|||
constexpr bool kDefaultCloneDeckOnLoad; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this sufficient to make kDefaultCloneDeckOnLoad
available from src/preferences/dialog/dlgprefdeck.cpp ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appearantly not (or it's just wrong) because comilation fails.
do I need to put in src/preferences/dialog/dlgprefdeck.h and include that in playermanager ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the easy route would be OK for me here.
80dc03a
to
aae48b2
Compare
@Be-ing Do you have ideas about the wording? Clone Deck [_] Double-press Load button to clone playing track into next stopped deck |
It looks like there are unrelated files in this branch. Can you rebase on master? |
yup, done. |
Current status or my last proposal?
|
How about "Double-press Load button to clone playing track"? |
But looking closer, I think we need to make the tooltip more clear: |
last commits where not pushed as I was in detached mode. Should be fine now, also the label & tooltip are finalized. |
aaargh.. |
86b1892
to
5032a3f
Compare
okay. Checkbox Label: Puh, ready to merge. |
How about removing the words "Mixxx finds" from the tooltip? |
I tested and this works as described. 👍 |
ping |
I'm wondering of double-load cloning should be off by default. It can interfere with a performance by making the volume jump unexpectedly, which would be especially surprising if you don't know about the feature. |
done. |
Thanks for this. I have occasionally been annoyed by accidentally triggering this feature. |
Surprises make a steep learning curve :) |
I think double pressing a load button to trigger this is less discoverable than dragging and dropping from deck to deck. |
hmm..maybe. I can't recall: besides the "bugs fixed" list, do we have a "New features" list for new major Mixxx versions? |
The release announcements serve that purpose. We could make dragging and dropping more discoverable by changing the cursor over draggable widgets. |
I'd like to change this, too.
|
Current
|
|
@Holzhaus maybe try running |
Sorry for the noise, this was caused by using Scons with Python 3 instead of Python 2.7. Should be fixed by uklotzde@03fad27. |
This adds an option to Preferences > Decks > Deck Options where users can disable Load double-tap to clone a playing deck (keyboard and controllers) (introduced in #1892).
I added this option because I accidentially cloned the adjacent deck way to often due to an unreliable Load button on controller, but also when I was in a hurry. Until now loading just worked, but now I had to double check that I actually loaded the track from the library and did NOT clone the other deck, which is annoying and drew too much attention from the actual task of DJing.
The new CO is called
[Controls],CloneDeckOnLoadDoubleTap
and defaults totrue
so the existing implementation remains unaffected for everyone.Any suggestions for the wording in Deck Options? I'm not happy with it..
Should the option only affect the Load button in Midi mapppings and always work on the keyboard?