From 6b42f1b7b75b8f89e7aaf9f045d34cc5d78dd88b Mon Sep 17 00:00:00 2001 From: Marc Coll Carrillo Date: Tue, 23 Sep 2014 22:19:25 +0200 Subject: [PATCH 1/2] Small correction in dynamic ribbon to avoid some weird behaviour in the GP editor --- src/guiengine/widgets/dynamic_ribbon_widget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/guiengine/widgets/dynamic_ribbon_widget.cpp b/src/guiengine/widgets/dynamic_ribbon_widget.cpp index 1be9a3fa1..8bf8cf817 100644 --- a/src/guiengine/widgets/dynamic_ribbon_widget.cpp +++ b/src/guiengine/widgets/dynamic_ribbon_widget.cpp @@ -492,6 +492,7 @@ void DynamicRibbonWidget::clearItems() m_items.clear(); m_animated_contents = false; m_scroll_offset = 0; + GUIEngine::needsUpdate.remove(this); } // ----------------------------------------------------------------------------- void DynamicRibbonWidget::elementRemoved() From 9c56d66c2d881a71ad797c867eaa99560a97de47 Mon Sep 17 00:00:00 2001 From: Marc Coll Carrillo Date: Tue, 23 Sep 2014 22:23:24 +0200 Subject: [PATCH 2/2] Minor corrections (a couple of warnings, unused headers...) --- src/race/grand_prix_manager.cpp | 3 +-- src/states_screens/edit_gp_screen.cpp | 4 ++++ src/states_screens/gp_info_screen.cpp | 2 +- src/states_screens/tracks_screen.cpp | 3 --- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/race/grand_prix_manager.cpp b/src/race/grand_prix_manager.cpp index 73eb589be..f4376b441 100644 --- a/src/race/grand_prix_manager.cpp +++ b/src/race/grand_prix_manager.cpp @@ -24,8 +24,7 @@ #include #include -#include -#include + GrandPrixManager *grand_prix_manager = NULL; diff --git a/src/states_screens/edit_gp_screen.cpp b/src/states_screens/edit_gp_screen.cpp index 837814ed1..7e4202b73 100644 --- a/src/states_screens/edit_gp_screen.cpp +++ b/src/states_screens/edit_gp_screen.cpp @@ -261,6 +261,10 @@ void EditGPScreen::loadList(const int selected) m_list->setSelectionID(selected); setSelected(selected); } + else + { + enableButtons(); + } } // ----------------------------------------------------------------------------- diff --git a/src/states_screens/gp_info_screen.cpp b/src/states_screens/gp_info_screen.cpp index 4b6bd804e..4539320be 100644 --- a/src/states_screens/gp_info_screen.cpp +++ b/src/states_screens/gp_info_screen.cpp @@ -175,7 +175,7 @@ void GPInfoScreen::init() // been added or deleted since the last time this screen was shown. m_group_spinner->clearLabels(); m_group_spinner->addLabel("all"); - int index_standard; + int index_standard=0; const std::vector& groups = track_manager->getAllTrackGroups(); for (unsigned int i = 0; i < groups.size(); i++) { diff --git a/src/states_screens/tracks_screen.cpp b/src/states_screens/tracks_screen.cpp index 348d3420e..9e25c46d4 100644 --- a/src/states_screens/tracks_screen.cpp +++ b/src/states_screens/tracks_screen.cpp @@ -67,9 +67,6 @@ void TracksScreen::eventCallback(Widget* widget, const std::string& name, if (selection == "random_track") { - RibbonWidget* tabs = getWidget("trackgroups"); - assert(tabs); - if (m_random_track_list.empty()) return; std::string track = m_random_track_list.front();