Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AttributeEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def __init__(self, parent, id, model):
else:
xm,ym = self.ScreenToClient(wx.Point(xwindow, ywindow))

self.SetPosition((xm,ym))
self.SetPosition((int(xm),int(ym)))

#default value for spinCtrl
self._sb_input.SetValue(model.input)
Expand Down
8 changes: 6 additions & 2 deletions devsimpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
import wx.py as py
import wx.lib.dialogs
import wx.html
import wx.lib.mixins.inspection as wit

try:
from wx.lib.agw import advancedsplash
Expand Down Expand Up @@ -1712,7 +1713,7 @@ def StartSimulationGUIWin(self, arg, diagrams):
g = 15*i
x = dw - w + g
y = dh - h + g
simFrame.SetPosition((x/2, y/2))
simFrame.SetPosition((int(x/2), int(y/2)))

simFrame.SetWindowStyle(wx.DEFAULT_FRAME_STYLE | wx.STAY_ON_TOP)

Expand Down Expand Up @@ -2366,7 +2367,7 @@ def flush(self):
pass

#-------------------------------------------------------------------
class DEVSimPyApp(wx.App):
class DEVSimPyApp(wx.App, wit.InspectionMixin):

outputWindowClass = PyOnDemandOutputWindow

Expand Down Expand Up @@ -2451,6 +2452,9 @@ def OnInit(self):
the main frame when it is time to do so.
"""

# initialize the inspection tool (enabled with Ctrl+Alt+I)
self.Init()

# Check runtime version
if wx.VERSION_STRING < __min_wx_version__:
wx.MessageBox(caption=_("Warning"),
Expand Down
17 changes: 1 addition & 16 deletions plugins/state_trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,9 @@
import subprocess
import importlib

required_libs = ['matplotlib']

for lib_name in required_libs:
try:
importlib.import_module(lib_name)
except:
subprocess.run(f'pip install {lib_name}'.split())

#import matplotlib.pyplot as plt

import wx.lib.agw.aui as aui
#import wx.lib.mixins.inspection as wit

import matplotlib as mpl
from matplotlib.backends.backend_wxagg import (
FigureCanvasWxAgg as FigureCanvas,
NavigationToolbar2WxAgg as NavigationToolbar)

class PlotPanel(wx.Panel):
def __init__(self, parent, id=-1, dpi=None, **kwargs):
wx.Panel.__init__(self, parent, id=id, **kwargs)
Expand Down Expand Up @@ -206,7 +191,7 @@ def PlotStateTrajectory(m):
dial = wx.MessageDialog(None,
_('Select at least one decorate transition function for %s.')%label,
_('Plot Manager'),
wx.OK | wx.ICON_EXCLAMATION)
wx.OK | wx.ICON_EXCLAION)
dial.ShowModal()
else:
dial = wx.MessageDialog(None,
Expand Down