From kde-commits Thu Oct 31 21:21:14 2013 From: Wolfgang Rohdewald Date: Thu, 31 Oct 2013 21:21:14 +0000 To: kde-commits Subject: [kajongg/sid] src: move scoring game related code from Board to ScoringHandBoard: focusTile.setter Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=138325486406749 Git commit 3a1c8c40fbe6acae5389063668c969ef0191bf69 by Wolfgang Rohdewald. Committed on 31/10/2013 at 15:07. Pushed by wrohdewald into branch 'sid'. move scoring game related code from Board to ScoringHandBoard: focusTile.se= tter M +1 -6 src/board.py M +6 -0 src/handboard.py http://commits.kde.org/kajongg/3a1c8c40fbe6acae5389063668c969ef0191bf69 diff --git a/src/board.py b/src/board.py index 7943c48..93aa02b 100644 --- a/src/board.py +++ b/src/board.py @@ -229,14 +229,9 @@ class Board(QGraphicsRectItem): self._focusTile =3D uiTile if self._focusTile and self._focusTile.tile in Debug.focusable: logDebug('%s: new focus uiTile %s from %s' % ( - self.name(), self._focusTile.tile if self._focusTile else = 'None', stack('')[-1])) - if (self.isHandBoard and self.player - and not self.player.game.isScoringGame() - and Internal.field.clientDialog): - Internal.field.clientDialog.focusTileChanged() + self.name, self._focusTile.tile if self._focusTile else 'N= one', stack('')[-1])) if self.hasFocus: self.scene().focusBoard =3D self - assert uiTile is self._focusTile = def setEnabled(self, enabled): """enable/disable this board""" diff --git a/src/handboard.py b/src/handboard.py index 464f8e9..1275954 100644 --- a/src/handboard.py +++ b/src/handboard.py @@ -147,6 +147,12 @@ class HandBoard(Board): # playing game: always make only single tiles selectable return 1 = + @Board.focusTile.setter + def focusTile(self, uiTile): # pylint: disable=3Darguments-differ + Board.focusTile.fset(self, uiTile) + if self.player and Internal.field.clientDialog: + Internal.field.clientDialog.focusTileChanged() + def __str__(self): return self.player.scoringString() =