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->ToggleTool(BUTTON_DRAG,true);
|
||||||
toolBar->Realize();
|
toolBar->Realize();
|
||||||
toolBar->Show(true);
|
toolBar->Show(true);
|
||||||
|
|
||||||
|
// Set default mode
|
||||||
|
PopulateFeatureList();
|
||||||
|
if (features.size() == 0) SetMode(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,10 +180,12 @@ void VisualToolVectorClip::Draw() {
|
||||||
// Draw preview of inserted line
|
// Draw preview of inserted line
|
||||||
if (mode == 1 || mode == 2) {
|
if (mode == 1 || mode == 2) {
|
||||||
if (spline.curves.size()) {
|
if (spline.curves.size()) {
|
||||||
SplineCurve *c0 = &spline.curves.front();
|
if (mx != -1 || my != -1) {
|
||||||
SplineCurve *c1 = &spline.curves.back();
|
SplineCurve *c0 = &spline.curves.front();
|
||||||
DrawDashedLine(mx,my,c0->p1.x,c0->p1.y,6);
|
SplineCurve *c1 = &spline.curves.back();
|
||||||
DrawDashedLine(mx,my,c1->GetEndPoint().x,c1->GetEndPoint().y,6);
|
DrawDashedLine(mx,my,c0->p1.x,c0->p1.y,6);
|
||||||
|
DrawDashedLine(mx,my,c1->GetEndPoint().x,c1->GetEndPoint().y,6);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue