Fix bug where features for the wrong line were displayed in the rectangular clip tool

Originally committed to SVN as r4619.
This commit is contained in:
Thomas Goyne 2010-06-27 07:53:08 +00:00
parent 44888bb008
commit dc2836e9e5
2 changed files with 8 additions and 3 deletions

View File

@ -63,12 +63,9 @@ VisualToolClip::VisualToolClip(VideoDisplay *parent, VideoState const& video, wx
/// @brief Draw
void VisualToolClip::Draw() {
// Get current line
AssDialogue *line = GetActiveDialogueLine();
if (!line) return;
// Get position
if (!dragging && !holding) GetLineClip(line,curX1,curY1,curX2,curY2,inverse);
int dx1 = curX1;
int dy1 = curY1;
int dx2 = curX2;
@ -215,3 +212,9 @@ void VisualToolClip::UpdateDrag(ClipCorner* feature) {
void VisualToolClip::CommitDrag(ClipCorner*) {
CommitHold();
}
void VisualToolClip::DoRefresh() {
AssDialogue* line = GetActiveDialogueLine();
if (line)
GetLineClip(line,curX1,curY1,curX2,curY2,inverse);
}

View File

@ -90,6 +90,8 @@ private:
void UpdateDrag(ClipCorner* feature);
void CommitDrag(ClipCorner* feature);
void DoRefresh();
public:
VisualToolClip(VideoDisplay *parent, VideoState const& video, wxToolBar *);