Browse Source

tools.cpp edited online with Bitbucket

Jose R Ortiz Ubarri 8 years ago
parent
commit
8ab8829054
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      tools.cpp

+ 5
- 2
tools.cpp View File

18
 // it hits a cell of a different color than that one clicked.
18
 // it hits a cell of a different color than that one clicked.
19
 
19
 
20
 void GridWidget::RowMajorFill(int x, int y, QColor colorClicked, QColor toolColor){
20
 void GridWidget::RowMajorFill(int x, int y, QColor colorClicked, QColor toolColor){
21
-
22
-
21
+     for (int i = x; i<getGridColumns() && (getCellColor(i,y) == colorClicked) ; i++)
22
+            switchOn(i, y, toolColor);
23
+    
24
+     for (int i = (x-1); i>=0 && (getCellColor(i,y) == colorClicked) ; i--)
25
+            switchOn(i, y, toolColor);
23
 }
26
 }
24
 
27
 
25
 
28