forked from mia/Aegisub
Don't disable or hide the visual tools while video is playing. Updates #1336.
Originally committed to SVN as r6168.
This commit is contained in:
parent
ae3895fb8e
commit
cfc7e009f2
4 changed files with 8 additions and 18 deletions
|
@ -229,13 +229,9 @@ void VideoContext::Reload() {
|
||||||
void VideoContext::OnSubtitlesCommit() {
|
void VideoContext::OnSubtitlesCommit() {
|
||||||
if (!IsLoaded()) return;
|
if (!IsLoaded()) return;
|
||||||
|
|
||||||
bool wasPlaying = IsPlaying();
|
|
||||||
Stop();
|
|
||||||
|
|
||||||
provider->LoadSubtitles(context->ass);
|
provider->LoadSubtitles(context->ass);
|
||||||
|
if (!IsPlaying())
|
||||||
GetFrameAsync(frame_n);
|
GetFrameAsync(frame_n);
|
||||||
|
|
||||||
if (wasPlaying) Play();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoContext::OnSubtitlesSave() {
|
void VideoContext::OnSubtitlesSave() {
|
||||||
|
|
|
@ -211,10 +211,8 @@ void VideoDisplay::Render() try {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mouse_pos || alwaysShowTools->GetBool()) {
|
if (mouse_pos || alwaysShowTools->GetBool())
|
||||||
if (!con->videoController->IsPlaying())
|
|
||||||
tool->Draw();
|
tool->Draw();
|
||||||
}
|
|
||||||
|
|
||||||
SwapBuffers();
|
SwapBuffers();
|
||||||
}
|
}
|
||||||
|
@ -355,9 +353,6 @@ void VideoDisplay::OnSizeEvent(wxSizeEvent &event) {
|
||||||
void VideoDisplay::OnMouseEvent(wxMouseEvent& event) {
|
void VideoDisplay::OnMouseEvent(wxMouseEvent& event) {
|
||||||
assert(w > 0);
|
assert(w > 0);
|
||||||
|
|
||||||
// Disable when playing
|
|
||||||
if (con->videoController->IsPlaying()) return;
|
|
||||||
|
|
||||||
if (event.ButtonDown())
|
if (event.ButtonDown())
|
||||||
SetFocus();
|
SetFocus();
|
||||||
|
|
||||||
|
|
|
@ -102,11 +102,11 @@ void VisualToolBase::OnSeek(int new_frame) {
|
||||||
if (frame_number == new_frame) return;
|
if (frame_number == new_frame) return;
|
||||||
|
|
||||||
frame_number = new_frame;
|
frame_number = new_frame;
|
||||||
dragging = false;
|
|
||||||
OnFrameChanged();
|
OnFrameChanged();
|
||||||
|
|
||||||
AssDialogue *new_line = GetActiveDialogueLine();
|
AssDialogue *new_line = GetActiveDialogueLine();
|
||||||
if (new_line != active_line) {
|
if (new_line != active_line) {
|
||||||
|
dragging = false;
|
||||||
active_line = new_line;
|
active_line = new_line;
|
||||||
OnLineChanged();
|
OnLineChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,14 +140,13 @@ void VisualToolDrag::OnFrameChanged() {
|
||||||
else {
|
else {
|
||||||
// Remove all features for this line (if any)
|
// Remove all features for this line (if any)
|
||||||
while (feat != end && feat->line == diag) {
|
while (feat != end && feat->line == diag) {
|
||||||
|
if (feat == active_feature) active_feature = features.end();
|
||||||
feat->line = 0;
|
feat->line = 0;
|
||||||
RemoveSelection(feat);
|
RemoveSelection(feat);
|
||||||
feat = features.erase(feat);
|
feat = features.erase(feat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
active_feature = features.end();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualToolDrag::OnSelectedSetChanged(const Selection &added, const Selection &removed) {
|
void VisualToolDrag::OnSelectedSetChanged(const Selection &added, const Selection &removed) {
|
||||||
|
|
Loading…
Reference in a new issue