From bf62f709938dcb5644dc8e4bc9d9cf5750bcd1a5 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Fri, 12 Jun 2020 01:11:22 +0930 Subject: cannot flag revealed tile --- MainWindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'MainWindow.cpp') diff --git a/MainWindow.cpp b/MainWindow.cpp index 063b22b..db72c9e 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -278,6 +278,8 @@ MainWindow::on_Tile_Right_Click(FXObject *sender, FXSelector sel, void *data) x = matrix->colOfChild(button); y = matrix->rowOfChild(button); tile = board->get_tile_at(x, y); + if (tile->is_revealed()) + return 1; printf("right click on: %d, %d\n", tile->get_x(), tile->get_y()); tile->toggle_flag(Tile::FLAGGED); printf("%d\n", tile->is_flagged()); -- cgit v1.2.3