From 0da9a4f111c7a7ec1b4f86705f9de754e575b8a7 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 12 Apr 2012 00:04:31 +0000 Subject: [PATCH] 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. --- aegisub/src/audio_timing_dialogue.cpp | 4 +++- aegisub/src/libresrc/default_config.json | 1 + aegisub/src/preferences.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/aegisub/src/audio_timing_dialogue.cpp b/aegisub/src/audio_timing_dialogue.cpp index aea983a18..a27992109 100644 --- a/aegisub/src/audio_timing_dialogue.cpp +++ b/aegisub/src/audio_timing_dialogue.cpp @@ -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 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 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; diff --git a/aegisub/src/libresrc/default_config.json b/aegisub/src/libresrc/default_config.json index 464815bb4..6b3473799 100644 --- a/aegisub/src/libresrc/default_config.json +++ b/aegisub/src/libresrc/default_config.json @@ -47,6 +47,7 @@ "Waveform Style" : 1 }, "Downmixer" : "ConvertToMono", + "Drag Timing" : true, "Inactive Lines Display Mode" : 1, "Karaoke" : { "Font Face" : "Verdana", diff --git a/aegisub/src/preferences.cpp b/aegisub/src/preferences.cpp index dc7cb5c0f..e71ab7fd2 100644 --- a/aegisub/src/preferences.cpp +++ b/aegisub/src/preferences.cpp @@ -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);