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:
Thomas Goyne 2011-12-27 01:38:00 +00:00
parent ae3895fb8e
commit cfc7e009f2
4 changed files with 8 additions and 18 deletions

View File

@ -229,13 +229,9 @@ void VideoContext::Reload() {
void VideoContext::OnSubtitlesCommit() {
if (!IsLoaded()) return;
bool wasPlaying = IsPlaying();
Stop();
provider->LoadSubtitles(context->ass);
if (!IsPlaying())
GetFrameAsync(frame_n);
if (wasPlaying) Play();
}
void VideoContext::OnSubtitlesSave() {

View File

@ -211,10 +211,8 @@ void VideoDisplay::Render() try {
}
}
if (mouse_pos || alwaysShowTools->GetBool()) {
if (!con->videoController->IsPlaying())
if (mouse_pos || alwaysShowTools->GetBool())
tool->Draw();
}
SwapBuffers();
}
@ -355,9 +353,6 @@ void VideoDisplay::OnSizeEvent(wxSizeEvent &event) {
void VideoDisplay::OnMouseEvent(wxMouseEvent& event) {
assert(w > 0);
// Disable when playing
if (con->videoController->IsPlaying()) return;
if (event.ButtonDown())
SetFocus();

View File

@ -102,11 +102,11 @@ void VisualToolBase::OnSeek(int new_frame) {
if (frame_number == new_frame) return;
frame_number = new_frame;
dragging = false;
OnFrameChanged();
AssDialogue *new_line = GetActiveDialogueLine();
if (new_line != active_line) {
dragging = false;
active_line = new_line;
OnLineChanged();
}

View File

@ -140,14 +140,13 @@ void VisualToolDrag::OnFrameChanged() {
else {
// Remove all features for this line (if any)
while (feat != end && feat->line == diag) {
if (feat == active_feature) active_feature = features.end();
feat->line = 0;
RemoveSelection(feat);
feat = features.erase(feat);
}
}
}
active_feature = features.end();
}
void VisualToolDrag::OnSelectedSetChanged(const Selection &added, const Selection &removed) {