WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit d104356

Browse files
committed
Possibly fix a crash when switching to playtest. v1.1.1.1
1 parent 017e482 commit d104356

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from __future__ import division, print_function
2020

21-
__version__ = '1.1.1'
21+
__version__ = '1.1.1.1'
2222

2323
import sys
2424
import os.path

editor.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -865,17 +865,16 @@ def closeevent(e):
865865
cells_by_id[it.id].revealed_resume = it.kind is not Cell.unknown
866866
window.closeEvent = closeevent
867867

868-
def delayed():
869-
window.load(struct)
870-
window.view.setSceneRect(self.view.sceneRect())
871-
window.view.setTransform(self.view.transform())
872-
window.view.horizontalScrollBar().setValue(self.view.horizontalScrollBar().value())
873-
delta = window.view.mapTo(window.central_widget, QPoint(0, 0))
874-
window.view.verticalScrollBar().setValue(self.view.verticalScrollBar().value()+delta.y())
875-
self.status = "Done", 1
876-
868+
window.load(struct)
877869
window.show()
878-
QTimer.singleShot(0, delayed)
870+
app.processEvents()
871+
window.view.setSceneRect(self.view.sceneRect())
872+
window.view.setTransform(self.view.transform())
873+
window.view.horizontalScrollBar().setValue(self.view.horizontalScrollBar().value())
874+
delta = window.view.mapTo(window.central_widget, QPoint(0, 0))
875+
window.view.verticalScrollBar().setValue(self.view.verticalScrollBar().value()+delta.y())
876+
877+
self.status = "Done", 1
879878

880879
def closeEvent(self, e):
881880
if not self.close_file():

0 commit comments

Comments
 (0)