forked from mia/Aegisub
Made vector clip default to insertion if there is no previous vector to edit (#522). Also fixed a minor glitch when mouse was outside the window on that mode.
Originally committed to SVN as r1709.
This commit is contained in:
parent
3aaffcf0fc
commit
400e37c2cd
1 changed files with 10 additions and 4 deletions
|
@ -78,6 +78,10 @@ VisualToolVectorClip::VisualToolVectorClip(VideoDisplay *parent,wxToolBar *_tool
|
|||
toolBar->ToggleTool(BUTTON_DRAG,true);
|
||||
toolBar->Realize();
|
||||
toolBar->Show(true);
|
||||
|
||||
// Set default mode
|
||||
PopulateFeatureList();
|
||||
if (features.size() == 0) SetMode(1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -176,12 +180,14 @@ void VisualToolVectorClip::Draw() {
|
|||
// Draw preview of inserted line
|
||||
if (mode == 1 || mode == 2) {
|
||||
if (spline.curves.size()) {
|
||||
if (mx != -1 || my != -1) {
|
||||
SplineCurve *c0 = &spline.curves.front();
|
||||
SplineCurve *c1 = &spline.curves.back();
|
||||
DrawDashedLine(mx,my,c0->p1.x,c0->p1.y,6);
|
||||
DrawDashedLine(mx,my,c1->GetEndPoint().x,c1->GetEndPoint().y,6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Draw preview of insert point
|
||||
if (mode == 4) DrawCircle(pt.x,pt.y,4);
|
||||
|
|
Loading…
Reference in a new issue