summaryrefslogtreecommitdiff
path: root/src/gui/game/GameView.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-06-08 04:23:06 (GMT)
committer jacob1 <jfu614@gmail.com>2013-06-08 04:23:06 (GMT)
commita1f9da2d0cedd4733102f1c1831cab5b51955ac2 (patch)
treeef63821023901cb401b7f97fe0a54872c4d5275d /src/gui/game/GameView.cpp
parent69961956bfae1529e6c451c57804b0d2aa93f422 (diff)
downloadpowder-a1f9da2d0cedd4733102f1c1831cab5b51955ac2.zip
powder-a1f9da2d0cedd4733102f1c1831cab5b51955ac2.tar.gz
fix tpt.selectedl not changing sometimes when using the element search or sample tool. Assume that new saves will get the auto-vote, so set that too.
Diffstat (limited to 'src/gui/game/GameView.cpp')
-rw-r--r--src/gui/game/GameView.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp
index 08387e7..735728f 100644
--- a/src/gui/game/GameView.cpp
+++ b/src/gui/game/GameView.cpp
@@ -617,7 +617,6 @@ void GameView::NotifyActiveToolsChanged(GameModel * sender)
if(sender->GetActiveTool(0) == tool)
{
toolButtons[i]->SetSelectionState(0); //Primary
- c->ActiveToolChanged(0, tool);
if (tool->GetIdentifier().find("DEFAULT_UI_WIND") != tool->GetIdentifier().npos)
windTool = true;
else
@@ -626,18 +625,20 @@ void GameView::NotifyActiveToolsChanged(GameModel * sender)
else if(sender->GetActiveTool(1) == tool)
{
toolButtons[i]->SetSelectionState(1); //Secondary
- c->ActiveToolChanged(1, tool);
}
else if(sender->GetActiveTool(2) == tool)
{
toolButtons[i]->SetSelectionState(2); //Tertiary
- c->ActiveToolChanged(2, tool);
}
else
{
toolButtons[i]->SetSelectionState(-1);
}
}
+ //need to do this for all tools every time just in case it wasn't caught if you weren't in the menu a tool was changed to
+ c->ActiveToolChanged(0, sender->GetActiveTool(0));
+ c->ActiveToolChanged(1, sender->GetActiveTool(1));
+ c->ActiveToolChanged(2, sender->GetActiveTool(2));
}
void GameView::NotifyLastToolChanged(GameModel * sender)