From adb200d3f72a9817a63a3c567e06fd75ed8aa797 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 24 Jul 2016 22:43:54 -0400 Subject: [PATCH] remove commented out code, heart icon shows even when element is selected --- src/gui/game/GameModel.cpp | 21 --------------------- src/gui/game/ToolButton.cpp | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/gui/game/GameModel.cpp b/src/gui/game/GameModel.cpp index 10bd933a7..7136dfb0a 100644 --- a/src/gui/game/GameModel.cpp +++ b/src/gui/game/GameModel.cpp @@ -370,27 +370,6 @@ void GameModel::BuildMenus() void GameModel::BuildFavoritesMenu() { menuList[SC_FAVORITES]->ClearTools(); - - /*for (size_t i = 0; i < menuList.size(); i++) - { - if (i == SC_FAVORITES) - continue; - - for (size_t j = 0; j < menuList[i]->GetToolList().size(); j++) - { - if (Favorite::Ref().IsFavorite(menuList[i]->GetToolList()[j]->GetIdentifier())) - { - menuList[SC_FAVORITES]->AddTool(menuList[i]->GetToolList()[j]); - } - } - } - for (size_t i = 0; i < extraElementTools.size(); i++) - { - if (Favorite::Ref().IsFavorite(extraElementTools[i]->GetIdentifier())) - { - menuList[SC_FAVORITES]->AddTool(extraElementTools[i]); - } - }*/ std::vector favList = Favorite::Ref().GetFavoritesList(); for (size_t i = 0; i < favList.size(); i++) diff --git a/src/gui/game/ToolButton.cpp b/src/gui/game/ToolButton.cpp index e14bc8f0b..fcc88300b 100644 --- a/src/gui/game/ToolButton.cpp +++ b/src/gui/game/ToolButton.cpp @@ -64,7 +64,7 @@ void ToolButton::Draw(const ui::Point& screenPos) { g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, Appearance.BorderInactive.Red, Appearance.BorderInactive.Green, Appearance.BorderInactive.Blue, Appearance.BorderInactive.Alpha); } - if (Favorite::Ref().IsFavorite(toolIdentifier) && currentSelection == -1) + if (Favorite::Ref().IsFavorite(toolIdentifier)) { g->drawtext(screenPos.X, screenPos.Y, "\xE8", Appearance.BorderFavorite.Red, Appearance.BorderFavorite.Green, Appearance.BorderFavorite.Blue, Appearance.BorderFavorite.Alpha); }