Version: (using KDE KDE 3.0.99) Installed from: Compiled From Sources OS: Linux There are actually two bugs in the Playground menu. First one: if you select the (let's say) A background, and then you load a saved file with B background, the tick in the menu doesn't get updated to the current background. Second bug: If you select (let's say) background B, and then you select it again, it should do nothing, but instead it unselects it making the menu without any selection (which is senseless in this context..)
Subject: KDE_3_1_BRANCH: kdegames/ktuberling CVS commit by staikos: Backport fix for 51494. Please remember to backport your bug fixes! (and close the bug) Note: please review the warnings in this code. It has some dangerous looking warnings right now. CCMAIL: 51494-done@bugs.kde.org, domseichter@web.de M +1 -1 playground.cpp 1.19.2.1 M +11 -2 toplevel.cpp 1.55.2.1 --- kdegames/ktuberling/playground.cpp #1.19:1.19.2.1 @@ -590,5 +590,5 @@ bool PlayGround::loadFrom(const QString return false; } - change(newGameboard); + topLevel->changeGameboard(newGameboard); for (;;) --- kdegames/ktuberling/toplevel.cpp #1.55:1.55.2.1 @@ -151,6 +151,9 @@ void TopLevel::changeGameboard(uint newG { // Do not accept to switch to same gameboard - if (newGameboard == selectedGameboard) + if (newGameboard == selectedGameboard) { + // select this gameboard again + ((KToggleAction*) actionCollection()->action(gameboardActions[newGameboard].latin1()))->setChecked(true); return; + } // Unselect preceeding gameboard @@ -161,4 +164,7 @@ void TopLevel::changeGameboard(uint newG writeOptions(); + if( !((KToggleAction*) actionCollection()->action(gameboardActions[selectedGameboard].latin1()))->isChecked() ) + ((KToggleAction*) actionCollection()->action(gameboardActions[selectedGameboard].latin1()))->setChecked(true); + // Change gameboard effectively playGround->change(newGameboard); @@ -169,6 +175,9 @@ void TopLevel::changeLanguage(uint newLa { // Do not accept to switch to same language - if (newLanguage == selectedLanguage && soundEnabled) + if (newLanguage == selectedLanguage && soundEnabled) { + // newLanguage should stay checked + ((KToggleAction*) actionCollection()->action(languageActions[newLanguage].latin1()))->setChecked(true); return; + } // Unselect preceeding language
Bug is fixed in CVS HEAD (fix will be part of 3.1.1) and therefore closed.