summaryrefslogtreecommitdiff
path: root/src/game/GameView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GameView.cpp')
-rw-r--r--src/game/GameView.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index af13797..5b6629b 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -984,6 +984,8 @@ void GameView::OnMouseDown(int x, int y, unsigned button)
if(button == BUTTON_MIDDLE)
toolIndex = 2;
isMouseDown = true;
+ if(!pointQueue.size())
+ c->HistorySnapshot();
if(drawMode == DrawRect || drawMode == DrawLine)
{
drawPoint1 = ui::Point(x, y);
@@ -1230,9 +1232,16 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
c->ChangeBrush();
break;
case 'z':
- isMouseDown = false;
- zoomCursorFixed = false;
- c->SetZoomEnabled(true);
+ if(ctrl)
+ {
+ c->HistoryRestore();
+ }
+ else
+ {
+ isMouseDown = false;
+ zoomCursorFixed = false;
+ c->SetZoomEnabled(true);
+ }
break;
case '`':
c->ShowConsole();
@@ -1384,8 +1393,11 @@ void GameView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bo
disableShiftBehaviour();
break;
case 'z':
- if(!zoomCursorFixed && !alt)
- c->SetZoomEnabled(false);
+ if(!ctrl)
+ {
+ if(!zoomCursorFixed && !alt)
+ c->SetZoomEnabled(false);
+ }
break;
}
}