Skip to content
Snippets Groups Projects
Commit 65eae54d authored by Silas Dohm's avatar Silas Dohm
Browse files

removed double connection

parent 6ac5c3f8
No related branches found
No related tags found
No related merge requests found
...@@ -53,11 +53,12 @@ Window::Window(QWidget *parent) ...@@ -53,11 +53,12 @@ Window::Window(QWidget *parent)
for (int d = 0; d < 9; d++) // rows and columns for (int d = 0; d < 9; d++) // rows and columns
{ {
connect(&grid[x + y * 9], SIGNAL(update(int)), &grid[x + d * 9], SLOT(removeOption(int))); connect(&grid[x + y * 9], SIGNAL(update(int)), &grid[x + d * 9], SLOT(removeOption(int)));
connect(&grid[x + y * 9], SIGNAL(update(int)), &grid[d + y * 9], SLOT(removeOption(int)));
connect(&grid[x + y * 9], SIGNAL(undo(int)), &grid[x + d * 9], SLOT(addOption(int))); connect(&grid[x + y * 9], SIGNAL(undo(int)), &grid[x + d * 9], SLOT(addOption(int)));
if(&grid[x+y*9]!= &grid[d+y*9]){
connect(&grid[x + y * 9], SIGNAL(update(int)), &grid[d + y * 9], SLOT(removeOption(int)));
connect(&grid[x + y * 9], SIGNAL(undo(int)), &grid[d + y * 9], SLOT(addOption(int))); connect(&grid[x + y * 9], SIGNAL(undo(int)), &grid[d + y * 9], SLOT(addOption(int)));
} }
}
int a = x / 3 * 3; int a = x / 3 * 3;
int b = y / 3 * 3; int b = y / 3 * 3;
for (int x1 = a; x1 < a + 3; x1++) // square for (int x1 = a; x1 < a + 3; x1++) // square
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment