[gnome-tetravex] Fix drawing code.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex] Fix drawing code.
- Date: Wed, 18 Sep 2019 02:12:06 +0000 (UTC)
commit 7898c17b16e5ce767ed793b73bcac68909a305ec
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Sep 18 04:09:41 2019 +0200
Fix drawing code.
Static tiles were drawn twice,
making a moving tile displayed
under them. More work would be
needed to handle the inversion
of two contiguous tiles, where
one tile is always drawn after
the other, causing half of the
time a little drawing problem.
src/puzzle-view.vala | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/puzzle-view.vala b/src/puzzle-view.vala
index 7df7f30..d11a8fd 100644
--- a/src/puzzle-view.vala
+++ b/src/puzzle-view.vala
@@ -341,6 +341,11 @@ private class PuzzleView : Gtk.DrawingArea
&& (image.y == image.target_y))
continue;
+ if ((selected_tile == null)
+ && (image.x == image.target_x)
+ && (image.y == image.target_y))
+ continue;
+
context.save ();
context.translate ((int) (image.x + 0.5), (int) (image.y + 0.5));
if (puzzle.paused)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]