Skip to content

Commit

Permalink
Merge pull request #31 from andidevel/develop
Browse files Browse the repository at this point in the history
FIX: issue #25.
  • Loading branch information
miguelmoreto authored Oct 26, 2020
2 parents 68f33f2 + a37da09 commit b1d0007
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions LabControle2.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,9 @@ def onBtnSimul(self):
#self.mpltoolbarSimul._positions.clear()
#self.mpltoolbarSimul._update_view()

# Setting curve navigation (but not for discrete time simulatioin)
if (self.sys.Type != 3):
# Setting curve navigation (but not for discrete time simulatioin or if output is disable)
self.mpltoolbarSimul.clear_curve_point()
if self.sys.Type != 3 and self.checkBoxSaida.isChecked():
self.mpltoolbarSimul.init_curve_point([(self.mplSimul.axes, t, y)])

#self.mplSimul.figure.clf()
Expand Down
6 changes: 6 additions & 0 deletions labnavigationtoolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ def init_curve_point(self, axes):
self.curveY[axis] = y
self.last_plot[axis] = None

def clear_curve_point(self):
self.curve_point = {}
self.curveX = {}
self.curveY = {}
self.last_plot = {}

def _set_axis_view_points(self, axis):
self.text_coordinates = 'X: {:.5f}, Y: {:.5f}'.format(self.curveX[axis][self.curve_point[axis]], self.curveY[axis][self.curve_point[axis]])

Expand Down

0 comments on commit b1d0007

Please sign in to comment.