diff --git a/aegisub/src/subs_edit_box.cpp b/aegisub/src/subs_edit_box.cpp index 2daec5800..81fdafe93 100644 --- a/aegisub/src/subs_edit_box.cpp +++ b/aegisub/src/subs_edit_box.cpp @@ -265,7 +265,7 @@ void SubsEditBox::SetSplitLineMode(wxSize newSize) { /// @param timeOnly /// @param weak /// -void SubsEditBox::Update (bool timeOnly,bool weak,bool video) { +void SubsEditBox::Update (bool timeOnly,bool weak) { if (enabled) { AssDialogue *curdiag = grid->GetActiveLine(); if (curdiag) { @@ -301,7 +301,6 @@ void SubsEditBox::Update (bool timeOnly,bool weak,bool video) { // Video VideoContext::Get()->curLine = curdiag; - if (video) VideoContext::Get()->UpdateDisplays(false); TextEdit->EmptyUndoBuffer(); } diff --git a/aegisub/src/subs_edit_box.h b/aegisub/src/subs_edit_box.h index 15a0f5ffd..d9811c469 100644 --- a/aegisub/src/subs_edit_box.h +++ b/aegisub/src/subs_edit_box.h @@ -255,7 +255,7 @@ public: void SetSplitLineMode(wxSize size=wxSize(-1,-1)); void CommitText(bool weak=false); - void Update(bool timeOnly=false,bool weak=false,bool video=true); + void Update(bool timeOnly=false,bool weak=false); void UpdateGlobals(); void UpdateFrameTiming(); void DoKeyPress(wxKeyEvent &event); diff --git a/aegisub/src/video_context.cpp b/aegisub/src/video_context.cpp index c1ebeb50a..4867742ef 100644 --- a/aegisub/src/video_context.cpp +++ b/aegisub/src/video_context.cpp @@ -320,6 +320,8 @@ void VideoContext::RemoveDisplay(VideoDisplay *display) { /// @param full /// void VideoContext::UpdateDisplays(bool full) { + if (!loaded) return; + for (std::list::iterator cur=displayList.begin();cur!=displayList.end();cur++) { VideoDisplay *display = *cur; diff --git a/aegisub/src/video_display.cpp b/aegisub/src/video_display.cpp index 7cd3ea8b6..e26688969 100644 --- a/aegisub/src/video_display.cpp +++ b/aegisub/src/video_display.cpp @@ -134,7 +134,6 @@ VideoDisplay::VideoDisplay(VideoBox *box, VideoSlider *ControlSlider, wxTextCtrl , SubsPosition(SubsPosition) , PositionDisplay(PositionDisplay) , videoOut(new VideoOutGL()) -, tool(new VisualToolCross(this, video, box->visualSubToolBar)) , activeMode(Video_Mode_Standard) , toolBar(box->visualSubToolBar) , scriptW(INT_MIN) @@ -326,16 +325,16 @@ void VideoDisplay::DrawOverscanMask(int sizeH, int sizeV, wxColor color, double gl.SetLineColour(wxColor(0, 0, 0), 0.0, 1); // Draw sides - E(gl.DrawRectangle(gapH, 0, w-gapH, sizeV)); // Top + E(gl.DrawRectangle(gapH, 0, w-gapH, sizeV)); // Top E(gl.DrawRectangle(w-sizeH, gapV, w, h-gapV)); // Right E(gl.DrawRectangle(gapH, h-sizeV, w-gapH, h)); // Bottom - E(gl.DrawRectangle(0, gapV, sizeH, h-gapV)); // Left + E(gl.DrawRectangle(0, gapV, sizeH, h-gapV)); // Left // Draw rounded corners - E(gl.DrawRing(gapH, gapV, rad1, rad2, 1.0, 180.0, 270.0)); // Top-left - E(gl.DrawRing(w-gapH, gapV, rad1, rad2, 1.0, 90.0, 180.0)); // Top-right + E(gl.DrawRing(gapH, gapV, rad1, rad2, 1.0, 180.0, 270.0)); // Top-left + E(gl.DrawRing(w-gapH, gapV, rad1, rad2, 1.0, 90.0, 180.0)); // Top-right E(gl.DrawRing(w-gapH, h-gapV, rad1, rad2, 1.0, 0.0, 90.0)); // Bottom-right - E(gl.DrawRing(gapH, h-gapV, rad1, rad2, 1.0,270.0,360.0)); // Bottom-left + E(gl.DrawRing(gapH, h-gapV, rad1, rad2, 1.0,270.0,360.0)); // Bottom-left E(glDisable(GL_BLEND)); } diff --git a/aegisub/src/visual_tool.cpp b/aegisub/src/visual_tool.cpp index b3dc0fc3d..c43a1d80c 100644 --- a/aegisub/src/visual_tool.cpp +++ b/aegisub/src/visual_tool.cpp @@ -90,10 +90,8 @@ VisualTool::VisualTool(VideoDisplay *parent, VideoState const& vide , ctrlDown(false) , altDown(false) { - if (VideoContext::Get()->IsLoaded()) { - frame_n = VideoContext::Get()->GetFrameN(); - VideoContext::Get()->grid->AddSelectionListener(this); - } + frame_n = VideoContext::Get()->GetFrameN(); + grid->AddSelectionListener(this); PopulateFeatureList(); } @@ -284,7 +282,7 @@ void VisualTool::Commit(bool full, wxString message) { } grid->CommitChanges(false,!full); if (full) - grid->editBox->Update(false, true, false); + grid->editBox->Update(false, true); } template