# HG changeset patch # User Wuzzy # Date 1507399641 -7200 # Node ID bc34fc75670e33dea1a349bcace5c0443914f243 # Parent 308846e051549fc548c4a2e22baa592821f87f2f Fix old team name not being removed after renaming team in frontend diff -r 308846e05154 -r bc34fc75670e ChangeLog.txt --- a/ChangeLog.txt Sat Oct 07 13:23:58 2017 -0400 +++ b/ChangeLog.txt Sat Oct 07 20:07:21 2017 +0200 @@ -278,6 +278,7 @@ * Fix caption of stats screen showing only one winner if multiple teams have won * Remove broken “Play again” button appearing in stats page after an online game * Weapons scheme editor: When leaving, it no longer flickers and the selection is not reset to Default + * Team editor: Fix old team being retained when renaming a team Content Creation: + Theme objects can now have more than 1 in-land rect specified. You can specify the amount in theme.cfg by adding another number (and ,) before the first rect diff -r 308846e05154 -r bc34fc75670e QTfrontend/ui/page/pageeditteam.cpp --- a/QTfrontend/ui/page/pageeditteam.cpp Sat Oct 07 13:23:58 2017 -0400 +++ b/QTfrontend/ui/page/pageeditteam.cpp Sat Oct 07 20:07:21 2017 +0200 @@ -436,6 +436,7 @@ { m_playerHash = playerHash; lazyLoad(); + OldTeamName = name; // Mostly create a default team, with 2 important exceptions: HWTeam newTeam(name); @@ -452,6 +453,7 @@ { m_playerHash = playerHash; lazyLoad(); + OldTeamName = name; HWTeam team(name); team.loadFromFile(); @@ -576,7 +578,8 @@ HWTeam PageEditTeam::data() { - HWTeam team(TeamNameEdit->text()); + HWTeam team(OldTeamName); + team.setName(TeamNameEdit->text()); team.setDifficulty(CBTeamLvl->currentIndex()); for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) diff -r 308846e05154 -r bc34fc75670e QTfrontend/ui/page/pageeditteam.h --- a/QTfrontend/ui/page/pageeditteam.h Sat Oct 07 13:23:58 2017 -0400 +++ b/QTfrontend/ui/page/pageeditteam.h Sat Oct 07 20:07:21 2017 +0200 @@ -70,6 +70,7 @@ HatButton * HHHats[HEDGEHOGS_PER_TEAM]; HWTeam data(); QString m_playerHash; + QString OldTeamName; KeyBinder * binder; bool m_loaded;