diff options
| author | jacob1 <jfu614@gmail.com> | 2013-06-09 02:23:53 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-06-09 02:23:53 (GMT) |
| commit | 16cb95de641e2a28a40599f4b6c21336b78f7287 (patch) | |
| tree | dca340f6f751aa49770759699045dad046e29c37 /src/gui/game/GameView.cpp | |
| parent | 0f5d0859b451f7cd716422a8b389129eb135ed60 (diff) | |
| download | powder-16cb95de641e2a28a40599f4b6c21336b78f7287.zip powder-16cb95de641e2a28a40599f4b6c21336b78f7287.tar.gz | |
fix problems with point queue, where it would draw a Point at A, a line from A to B, and a line from B to B every frame
Diffstat (limited to 'src/gui/game/GameView.cpp')
| -rw-r--r-- | src/gui/game/GameView.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp index 735728f..d84bc41 100644 --- a/src/gui/game/GameView.cpp +++ b/src/gui/game/GameView.cpp @@ -1141,7 +1141,6 @@ void GameView::OnMouseUp(int x, int y, unsigned button) if(drawMode == DrawPoints) { c->ToolClick(toolIndex, c->PointTranslate(ui::Point(x, y))); - //pointQueue.push(ui::Point(x, y)); } if(drawModeReset) { @@ -1209,10 +1208,6 @@ void GameView::OnMouseWheel(int x, int y, int d) else { c->AdjustBrushSize(d, false, shiftBehaviour, ctrlBehaviour); - if(isMouseDown) - { - pointQueue.push(ui::Point(c->PointTranslate(ui::Point(x, y)))); - } } } @@ -1522,7 +1517,7 @@ void GameView::OnTick(float dt) c->SetZoomPosition(currentMouse); if(drawMode == DrawPoints) { - if(isMouseDown) + if(isMouseDown && pointQueue.empty()) { pointQueue.push(ui::Point(c->PointTranslate(currentMouse))); } |
