Merge lp:~fredoust/sudoku-app/fix-bug-1200732 into lp:sudoku-app

Proposed by Frédéric Delgado
Status: Merged
Approved by: Dinko Osmankovic
Approved revision: 78
Merged at revision: 78
Proposed branch: lp:~fredoust/sudoku-app/fix-bug-1200732
Merge into: lp:sudoku-app
Diff against target: 65 lines (+14/-2)
2 files modified
components/SudokuBlocksGrid.qml (+4/-0)
components/SudokuButtonsGrid.qml (+10/-2)
To merge this branch: bzr merge lp:~fredoust/sudoku-app/fix-bug-1200732
Reviewer Review Type Date Requested Status
Dinko Osmankovic Approve
Review via email: mp+174483@code.launchpad.net
To post a comment you must log in.
78. By Frédéric Delgado

Fix for bug 1200732 patch

Revision history for this message
Dinko Osmankovic (dinko-metalac) :
review: Approve
Revision history for this message
David Planella (dpm) wrote :

Thanks a lot Frédéric!

Please remember to set the commit message in the merge proposal, otherwise Jenkins will fail. If you could also set the description, to understand what the change is about, that'd also be great.

Keep up the great work!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/SudokuBlocksGrid.qml'
2--- components/SudokuBlocksGrid.qml 2013-07-12 07:56:21 +0000
3+++ components/SudokuBlocksGrid.qml 2013-07-12 19:18:25 +0000
4@@ -85,6 +85,7 @@
5 grid.setValue(hintColumn, hintRow, solution.getValue(hintColumn, hintRow));
6 buttonsGrid.itemAt(hintRow*9 + hintColumn).buttonText = solution.getValue(hintColumn, hintRow);
7 buttonsGrid.itemAt(hintRow*9 + hintColumn).buttonColor = defaultHintColor;
8+ buttonsGrid.itemAt(hintRow*9 + hintColumn).hinted = true;
9 }
10
11 }
12@@ -175,6 +176,7 @@
13 buttonsGrid.itemAt(i*9 + j).boldText = boldText;
14 buttonsGrid.itemAt(i*9 + j).border.color = defaultBorderColor;
15 buttonsGrid.itemAt(i*9 + j).enabled = true;
16+ buttonsGrid.itemAt(i*9 + j).hinted = false;
17 }
18 }
19
20@@ -317,6 +319,7 @@
21 grid.setValue(column,row, 0);
22 buttonsGrid.itemAt(currentX).buttonColor = defaultColor;
23 buttonsGrid.itemAt(currentX).boldText = false;
24+ buttonsGrid.itemAt(currentX).hinted = false
25 buttonsGrid.redrawGrid()
26 PopupUtils.close(dialogue)
27 }
28@@ -342,6 +345,7 @@
29
30 onTriggered: {
31 buttonsGrid.itemAt(currentX).buttonText = index+1
32+ buttonsGrid.itemAt(currentX).hinted = false
33 numberOfActions++;
34
35 var row = Math.floor(currentX/9);
36
37=== modified file 'components/SudokuButtonsGrid.qml'
38--- components/SudokuButtonsGrid.qml 2013-07-05 21:36:31 +0000
39+++ components/SudokuButtonsGrid.qml 2013-07-12 19:18:25 +0000
40@@ -30,8 +30,13 @@
41 buttonsGrid.itemAt(i).buttonColor = defaultNotAllowedColor;
42 }
43 else {
44- buttonsGrid.itemAt(i).buttonColor = defaultColor;
45- buttonsGrid.itemAt(currentX).boldText = false;
46+ if(buttonsGrid.itemAt(i).hinted)
47+ {
48+ buttonsGrid.itemAt(i).buttonColor = defaultHintColor;
49+ }else{
50+ buttonsGrid.itemAt(i).buttonColor = defaultColor;
51+ buttonsGrid.itemAt(currentX).boldText = false;
52+ }
53 }
54 }
55 }
56@@ -39,6 +44,9 @@
57
58 SudokuButton {
59 id: gridButton;
60+
61+ property bool hinted : false
62+
63 buttonText: "0";
64 //width: units.gu(5);
65 //height: units.gu(5);

Subscribers

People subscribed via source and target branches