Bug 268585

Summary: Score from previous game not cleared when starting new game in Kblocks 0.3
Product: [Applications] kblocks Reporter: Jesper Goll <jesper>
Component: generalAssignee: Zhongjie Cai <squall.leonhart.cai>
Status: RESOLVED FIXED    
Severity: normal CC: kde-games-bugs, schwarzer
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jesper Goll 2011-03-15 21:23:06 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

If you start a new game right after another, the score from the previous
game remains on-screen until the first time points are scored in the new game.

Reproducible: Always

Steps to Reproduce:
Install OpenSuse 11.4 with KDE 4.6 (and with KBlocks 0.3), then play KBlocks.

Actual Results:  
Score display not cleared when starting new game. 

Expected Results:  
The score from the previous game (in the status line) should be cleared when
you start a new one.

This bug supersedes bug 268528, part 4 - as it would appear that combined bug reports are unhandy in the bug tracking process.
Comment 1 Frederik Schwarzer 2011-03-16 15:17:34 UTC
Confirmed. After another short look I think the following will fix this. Again, I cannot compile at the moment, so could anyone please test it?

I used the placeholders so that no new string will be introduced for translation (in case it works ;)).

Index: KBlocksWin.cpp
===================================================================
--- KBlocksWin.cpp      (revision 1225051)
+++ KBlocksWin.cpp      (working copy)
@@ -127,6 +127,8 @@
         stopGame();
         startGame();
     }
+
+    statusBar()->changeItem( i18n("Points: %1 - Lines: %2 - Level: %3", 0, 0, 0), 0 );
 }
 
 void KBlocksWin::stopGame()
Comment 2 Zhongjie Cai 2011-03-16 16:08:29 UTC
If anyone could test this, I believe it'll do.
Comment 3 Frederik Schwarzer 2011-03-16 20:17:57 UTC
Ok, tested on another box and it works. :)
Comment 4 Frederik Schwarzer 2011-03-16 20:18:29 UTC
SVN commit 1225073 by schwarzer:

Fix score display not being updated on new game.

BUG: 268585

 M  +2 -0      KBlocksWin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1225073
Comment 5 Frederik Schwarzer 2011-03-16 20:24:37 UTC
SVN commit 1225075 by schwarzer:

Fix score display not being updated on new game.

BUG: 268585

 M  +2 -0      KBlocksWin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1225075