Bug 308889 - Can not change the difficulty level after starting the first game
Summary: Can not change the difficulty level after starting the first game
Status: RESOLVED FIXED
Alias: None
Product: kbounce
Classification: Applications
Component: general (show other bugs)
Version: 0.11
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Roney Gomes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-23 18:04 UTC by André Marcelo Alvarenga
Modified: 2012-12-10 00:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description André Marcelo Alvarenga 2012-10-23 18:04:15 UTC
If I start a new game, I can not change the difficulty level. The corresponding ComboBox stays disabled.
This happens when I try to start a new game without finishing the already started.

Reproducible: Always

Steps to Reproduce:
1. Open KBounce.
2. Start the game. (the difficulty level was disabled)
3. Game -> New (Ctrl+N)
4. Click on "Close" button
5. Click on "Remember" (highscore dialog)
6. The new game started and you can not change the difficulty level.



PS: When the game over, the difficulty level ComboBox working properly.
Comment 1 Roney Gomes 2012-10-27 22:08:43 UTC
A patch to solve this bug has already been made and it's just waiting for revision on Review Board.
Comment 2 Roney Gomes 2012-12-10 00:10:50 UTC
Git commit 886a6153f1e5d9fce91c4180ba1f6bc45586048d by Roney Gomes.
Committed on 10/12/2012 at 01:03.
Pushed by roneygomes into branch 'master'.

Allows the player to change game difficulty at any time.

The KBounceGameWidget::setGameDifficulty() method has been created based
on the old version of the levelChanged() slot and is responsible for
increasing or decreasing balls' and walls' velocity.

In the other hand, levelChanged's new version reacts to the user input
making calls to setGameDifficulty() starting a new game when required.

The point is to make methods follow the single responsibility model,
making things easy to understand and maintain.
REVIEW: 107084

M  +13   -3    gamewidget.cpp
M  +2    -1    gamewidget.h
M  +0    -2    mainwindow.cpp

http://commits.kde.org/kbounce/886a6153f1e5d9fce91c4180ba1f6bc45586048d
Comment 3 Roney Gomes 2012-12-10 00:10:50 UTC
Git commit 886a6153f1e5d9fce91c4180ba1f6bc45586048d by Roney Gomes.
Committed on 10/12/2012 at 01:03.
Pushed by roneygomes into branch 'master'.

Allows the player to change game difficulty at any time.

The KBounceGameWidget::setGameDifficulty() method has been created based
on the old version of the levelChanged() slot and is responsible for
increasing or decreasing balls' and walls' velocity.

In the other hand, levelChanged's new version reacts to the user input
making calls to setGameDifficulty() starting a new game when required.

The point is to make methods follow the single responsibility model,
making things easy to understand and maintain.
REVIEW: 107084

M  +13   -3    gamewidget.cpp
M  +2    -1    gamewidget.h
M  +0    -2    mainwindow.cpp

http://commits.kde.org/kbounce/886a6153f1e5d9fce91c4180ba1f6bc45586048d
Comment 4 Roney Gomes 2012-12-10 00:15:09 UTC
Won't be backported to 4.9.4 due conflicts with master. The code has changed a lot in the last months since the porting to the QGraphicsView and KgSounde frameworks and wouldn't be possible to make this fix available without a merge.