Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Kajongg
Commits
62be178b
Commit
62be178b
authored
May 05, 2021
by
Wolfgang Rohdewald
Browse files
Move cancellation of animations from mainwindow to game
parent
42c008c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/game.py
View file @
62be178b
...
...
@@ -29,7 +29,7 @@ from sound import Voice
from
wall
import
Wall
from
move
import
Move
from
player
import
Players
,
Player
,
PlayingPlayer
from
animation
import
animateAndDo
,
AnimationSpeed
from
animation
import
animateAndDo
,
AnimationSpeed
,
ParallelAnimationGroup
if
os
.
name
!=
'nt'
:
import
resource
...
...
@@ -349,6 +349,8 @@ class Game:
"""log off from the server and return a Deferred"""
self
.
wall
=
None
self
.
lastDiscard
=
None
if
Options
.
gui
:
ParallelAnimationGroup
.
cancelAll
()
def
playerByName
(
self
,
playerName
):
"""return None or the matching player"""
...
...
src/mainwindow.py
View file @
62be178b
...
...
@@ -79,7 +79,7 @@ try:
from
scoringdialog
import
ScoreTable
,
ExplainView
from
humanclient
import
HumanClient
from
rulesetselector
import
RulesetSelector
from
animation
import
afterQueuedAnimations
,
AnimationSpeed
,
ParallelAnimationGroup
from
animation
import
afterQueuedAnimations
,
AnimationSpeed
from
chat
import
ChatWindow
from
scene
import
PlayingScene
,
ScoringScene
from
configdialog
import
ConfigDialog
...
...
@@ -344,8 +344,6 @@ class MainWindow(KXmlGuiWindow):
def
close
(
self
,
unusedResult
=
None
):
"""wrap close() because we call it with a QTimer"""
if
isAlive
(
self
):
if
Options
.
gui
:
ParallelAnimationGroup
.
cancelAll
()
return
KXmlGuiWindow
.
close
(
self
)
return
True
# is closed
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment