Skip to content

Commit

Permalink
Fixed #12 by ensuring PlotWindow methods are not wrapped twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarant committed Nov 2, 2017
1 parent 2e0bf19 commit ddada70
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Binary file added dist/Soar-1.3.6.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def __getattr__(cls, name):
# built documents.
#
# The short X.Y version.
version = '1.3.5'
version = '1.3.6'
# The full version, including alpha/beta/rc tags.
release = '1.3.5'
release = '1.3.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions soar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# soar/__init__.py
""" Soar (Snakes on a Robot) v1.3.5
""" Soar (Snakes on a Robot) v1.3.6
An extensible Python framework for both simulating and interacting with robots.
Copyright (C) 2017 Andrew Antonitis. Licensed under the LGPLv3.
"""
__version__ = '1.3.5'
__version__ = '1.3.6'
blerb = 'Soar (Snakes on a Robot) v' + __version__ + ': A Python robotics framework.\n' \
'https://github.com/arantonitis/soar\n\n' \
'Copyright (C) 2017 Andrew Antonitis. Licensed under the LGPLv3.'
Expand Down
5 changes: 4 additions & 1 deletion soar/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,10 @@ class WrappedPlotWindow(PlotWindow):
if gui:
def __init__(self, title='Plotting Window', visible=True):
# Wrap the class init so that it runs in the Tk mainloop
tkinter_execute(return_exceptions(PlotWindow.__init__))(self, title, visible=visible)
if current_thread() != main_thread(): # If not on the main thread, force it
tkinter_execute(return_exceptions(PlotWindow.__init__))(self, title, visible=visible)
else: # If we're already on the main thread, do a normal init
PlotWindow.__init__(self, title, visible=visible)
# Attach the window to the UI, and add it to the list of plots
gui.attach_window(self)
plots.append(self)
Expand Down
2 changes: 2 additions & 0 deletions soar/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def version_parse(x): # Parse version increment strings into integers
if need_update:
if pypi_version[3] != inf:
pypi_version[3] = 'dev' + str(pypi_version[3])
else:
pypi_version = pypi_version[:-1] # Slice off the irrelevant infinite dev version
version_string = '.'.join([str(x) for x in pypi_version])
return 'A newer version of Soar is available: v' + version_string + '\nPlease update your installation.'
else:
Expand Down

0 comments on commit ddada70

Please sign in to comment.