diff options
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/GameController.cpp | 4 | ||||
| -rw-r--r-- | src/game/GameModel.cpp | 4 | ||||
| -rw-r--r-- | src/game/ToolButton.cpp | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index c866805..1e10b0e 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -188,6 +188,10 @@ GameController::~GameController() { delete localBrowser; } + if (options) + { + delete options; + } if(ui::Engine::Ref().GetWindow() == gameView) { ui::Engine::Ref().CloseWindow(); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 0dbf2f7..423a611 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -179,6 +179,10 @@ GameModel::~GameModel() { delete *iter; } + for(std::vector<QuickOption*>::iterator iter = quickOptions.begin(), end = quickOptions.end(); iter != end; ++iter) + { + delete *iter; + } delete sim; delete ren; if(placeSave) diff --git a/src/game/ToolButton.cpp b/src/game/ToolButton.cpp index aa31b3d..c19f0c6 100644 --- a/src/game/ToolButton.cpp +++ b/src/game/ToolButton.cpp @@ -22,6 +22,7 @@ void ToolButton::OnMouseClick(int x, int y, unsigned int button) void ToolButton::OnMouseUnclick(int x, int y, unsigned int button) { + isButtonDown = false; if(isButtonDown) { if(button == BUTTON_LEFT) @@ -32,7 +33,6 @@ void ToolButton::OnMouseUnclick(int x, int y, unsigned int button) SetSelectionState(2); DoAction(); } - isButtonDown = false; } void ToolButton::Draw(const ui::Point& screenPos) |
