From 50b6940ebe6a645b4405e0b727d0758b2aaf2024 Mon Sep 17 00:00:00 2001
From: Paolo Capriotti
Date: Fri, 26 Jun 2009 02:04:52 +0200
Subject: [PATCH] Avoid relayout for null flip
---
lib/board/table.rb | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/board/table.rb b/lib/board/table.rb
index b18fece..4b505af 100644
--- a/lib/board/table.rb
+++ b/lib/board/table.rb
@@ -57,10 +57,12 @@ class Table < Qt::GraphicsView
end
def flip(value)
- @theme.layout.flip(value)
- @theme.board.flip(value)
- @theme.pieces.flip(value)
- relayout
+ if flipped? != value
+ @theme.layout.flip(value)
+ @theme.board.flip(value)
+ @theme.pieces.flip(value)
+ relayout
+ end
end
def resizeEvent(e)
--
2.11.4.GIT