summaryrefslogtreecommitdiff
path: root/src/game/GameView.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-01-15 16:10:30 (GMT)
committer jacob1 <jfu614@gmail.com>2013-01-15 16:10:30 (GMT)
commit62195dc2a32962d107736da05295e300eb9f7a8d (patch)
tree6039aa7e59bafa5ac0bdc33aaacdf208b502e6bf /src/game/GameView.cpp
parenta27d637ceb0bb39127cbd47c041773041852c995 (diff)
downloadpowder-62195dc2a32962d107736da05295e300eb9f7a8d.zip
powder-62195dc2a32962d107736da05295e300eb9f7a8d.tar.gz
allow removing zoom tool when shift drawing lines
Diffstat (limited to 'src/game/GameView.cpp')
-rw-r--r--src/game/GameView.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index 0708778..a037d05 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -1018,7 +1018,7 @@ void GameView::OnMouseDown(int x, int y, unsigned button)
c->HistorySnapshot();
if(drawMode == DrawRect || drawMode == DrawLine)
{
- drawPoint1 = ui::Point(x, y);
+ drawPoint1 = c->PointTranslate(ui::Point(x, y));
}
if(drawMode == DrawPoints)
{
@@ -1288,7 +1288,8 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
}
else
{
- isMouseDown = false;
+ if (drawMode != DrawLine)
+ isMouseDown = false;
zoomCursorFixed = false;
c->SetZoomEnabled(true);
}