From 6f23c635beec472aa4686f133db19a84b9004819 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sun, 15 Jun 2008 12:11:04 +0000 Subject: [PATCH] Left-dragging the selection start marker in the audio display now only restarts the selection after a threshold defined by the Audio Start Drag Sensitivity option. A commented-out editbox for this value is added to the Options dialogue, it is commented out due to the feature freeze towards 2.2.0. This should fix #703. Originally committed to SVN as r2198. --- aegisub/audio_display.cpp | 2 +- aegisub/dialog_options.cpp | 8 ++++++++ aegisub/options.cpp | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/aegisub/audio_display.cpp b/aegisub/audio_display.cpp index 36f720e71..2eb452a5a 100644 --- a/aegisub/audio_display.cpp +++ b/aegisub/audio_display.cpp @@ -1591,7 +1591,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) { updated = true; diagUpdated = true; - if (leftIsDown && x != lastX) { + if (leftIsDown && abs((long)(x-lastX)) > Options.AsInt(_T("Audio Start Drag Sensitivity"))) { selStart = lastX; selEnd = x; curStartMS = GetBoundarySnap(GetMSAtX(lastX),10,event.ShiftDown(),true); diff --git a/aegisub/dialog_options.cpp b/aegisub/dialog_options.cpp index 536e0c9e0..2ef6e9394 100644 --- a/aegisub/dialog_options.cpp +++ b/aegisub/dialog_options.cpp @@ -453,6 +453,14 @@ DialogOptions::DialogOptions(wxWindow *parent) AddTextControl(audioPage,audioSizer4,_("Default lead-in length"),_T("Audio lead in"),TEXT_TYPE_NUMBER); AddTextControl(audioPage,audioSizer4,_("Default lead-out length"),_T("Audio lead out"),TEXT_TYPE_NUMBER); AddComboControl(audioPage,audioSizer4,_("Show inactive lines"),_T("Audio Inactive Lines Display Mode"),wxArrayString(3,choices1)); + /* + * Option not in dialogue because it breaks the documentation. + * The default should be good enough for most people and it can still be edited manually. + * This should be enabled when we can raise the UI/feature freeze towards 2.2.0. + * -jfs + * + AddTextControl(audioPage,audioSizer4,_("Start-marker drag sensitivity"),_T("Audio Start Drag Sensitivity"),TEXT_TYPE_NUMBER); + */ audioSizer4->AddGrowableCol(0,1); // Sizers diff --git a/aegisub/options.cpp b/aegisub/options.cpp index c34c171fc..98ac24105 100644 --- a/aegisub/options.cpp +++ b/aegisub/options.cpp @@ -189,6 +189,7 @@ void OptionsManager::LoadDefaults(bool onlyDefaults,bool doOverride) { SetModificationType(MOD_AUDIO); SetInt(_T("Audio Inactive Lines Display Mode"),1); SetBool(_T("Disable Dragging Times"), false); + SetInt(_T("Audio Start Drag Sensitivity"), 2); // Audio Advanced SetModificationType(MOD_AUDIO_RELOAD);