Skip to content
Permalink
Browse files

BF: Disable Pavlovia Run when syncing.

This fix disables Pavlovia Run when syncing because running too early caused a wx error. The choice to use 0 or 1 for toggle state was more intuitive than False or True. Happy to change if bool is preferred.
  • Loading branch information...
dvbridges authored and peircej committed Feb 4, 2019
1 parent 80d11c6 commit 8cadce02d4c3b4b371b0ff7ac4469991bc7f5c5f
Showing with 6 additions and 0 deletions.
  1. +6 −0 psychopy/app/builder/builder.py
@@ -2264,7 +2264,10 @@ def _getExportPref(self, pref):
def onPavloviaSync(self, evt=None):
if self._getExportPref('on sync'):
self.fileExport(htmlPath=self._getHtmlPath(self.filename))

self.togglePavloviaButton('pavloviaRun', 0)
pavlovia_ui.syncProject(parent=self, project=self.project)
self.togglePavloviaButton('pavloviaRun', 1)

def onPavloviaRun(self, evt=None):
if self._getExportPref('on save'):
@@ -2290,6 +2293,9 @@ def onPavloviaRun(self, evt=None):
url = "https://pavlovia.org/run/{}/html".format(self.project.id)
wx.LaunchDefaultBrowser(url)

def togglePavloviaButton(self, name, state):
self.toolbar.EnableTool(self.btnHandles[name].GetId(), state)

def setPavloviaUser(self, user):
# TODO: update user icon on button to user avatar
pass

0 comments on commit 8cadce0

Please sign in to comment.
You can’t perform that action at this time.