Add option to disable the new behavior where left-click-drag sets the start marker then drags the end marker

Originally committed to SVN as r6694.
This commit is contained in:
Thomas Goyne 2012-04-12 00:04:31 +00:00
parent 313fa2e1eb
commit 0da9a4f111
3 changed files with 5 additions and 2 deletions

View file

@ -322,6 +322,7 @@ class AudioTimingControllerDialogue : public AudioTimingController, private Sele
const agi::OptionValue *auto_commit;
const agi::OptionValue *inactive_line_mode;
const agi::OptionValue *inactive_line_comments;
const agi::OptionValue *drag_timing;
agi::signal::Connection commit_connection;
agi::signal::Connection audio_open_connection;
@ -416,6 +417,7 @@ AudioTimingControllerDialogue::AudioTimingControllerDialogue(agi::Context *c)
, auto_commit(OPT_GET("Audio/Auto/Commit"))
, inactive_line_mode(OPT_GET("Audio/Inactive Lines Display Mode"))
, inactive_line_comments(OPT_GET("Audio/Display/Draw/Inactive Comments"))
, drag_timing(OPT_GET("Audio/Drag Timing"))
, commit_connection(c->ass->AddCommitListener(&AudioTimingControllerDialogue::OnFileChanged, this))
, inactive_line_mode_connection(OPT_SUB("Audio/Inactive Lines Display Mode", &AudioTimingControllerDialogue::RegenerateInactiveLines, this))
, inactive_line_comment_connection(OPT_SUB("Audio/Display/Draw/Inactive Comments", &AudioTimingControllerDialogue::RegenerateInactiveLines, this))
@ -604,7 +606,7 @@ std::vector<AudioMarker*> AudioTimingControllerDialogue::OnLeftClick(int ms, boo
// right as the dragged one, such that if the user does start dragging,
// he will create a new selection from scratch
std::vector<AudioMarker*> jump = GetLeftMarkers();
ret = GetRightMarkers();
ret = drag_timing->GetBool() ? GetRightMarkers() : jump;
// Get ret before setting as setting may swap left/right
SetMarkers(jump, SnapPosition(ms, snap_range, jump));
return ret;

View file

@ -47,6 +47,7 @@
"Waveform Style" : 1
},
"Downmixer" : "ConvertToMono",
"Drag Timing" : true,
"Inactive Lines Display Mode" : 1,
"Karaoke" : {
"Font Face" : "Verdana",

View file

@ -129,7 +129,7 @@ Audio::Audio(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _(
OptionAdd(general, _("Snap markers by default"), "Audio/Snap/Enable");
OptionAdd(general, _("Auto-focus on mouse over"), "Audio/Auto/Focus");
OptionAdd(general, _("Play audio when stepping in video"), "Audio/Plays When Stepping Video");
CellSkip(general);
OptionAdd(general, _("Left-click-drag moves end marker"), "Audio/Drag Timing");
OptionAdd(general, _("Default timing length (ms)"), "Timing/Default Duration", 0, 36000);
OptionAdd(general, _("Default lead-in length (ms)"), "Audio/Lead/IN", 0, 36000);
OptionAdd(general, _("Default lead-out length (ms)"), "Audio/Lead/OUT", 0, 36000);