Skip to content
Snippets Groups Projects
Commit 3963beab authored by mattminder's avatar mattminder
Browse files

Removed bug when not showing numbers

parent c4798863
No related branches found
No related tags found
No related merge requests found
...@@ -211,9 +211,7 @@ def Init(parent): ...@@ -211,9 +211,7 @@ def Init(parent):
parent.button_extractfluorescence.setStatusTip('Extract the total intensity, area and variance of the cells in the different channels') parent.button_extractfluorescence.setStatusTip('Extract the total intensity, area and variance of the cells in the different channels')
# SHOW THE VALUES OF THE CELLS # SHOW THE VALUES OF THE CELLS
parent.button_showval.stateChanged.connect(parent.m.ShowCellNumbersCurr) parent.button_showval.stateChanged.connect(parent.m.UpdatePlots)
parent.button_showval.stateChanged.connect(parent.m.ShowCellNumbersPrev)
parent.button_showval.stateChanged.connect(parent.m.ShowCellNumbersNext)
parent.button_showval.setShortcut('V') parent.button_showval.setShortcut('V')
parent.button_showval.setToolTip("Use V Key for shortcut") parent.button_showval.setToolTip("Use V Key for shortcut")
......
...@@ -324,7 +324,6 @@ class PlotCanvas(FigureCanvas): ...@@ -324,7 +324,6 @@ class PlotCanvas(FigureCanvas):
# Plot cell numbers # Plot cell numbers
self.ShowCellNumbers() self.ShowCellNumbers()
self.update() self.update()
self.flush_events() self.flush_events()
...@@ -379,6 +378,8 @@ class PlotCanvas(FigureCanvas): ...@@ -379,6 +378,8 @@ class PlotCanvas(FigureCanvas):
self.ShowCellNumbersCurr() self.ShowCellNumbersCurr()
self.ShowCellNumbersNext() self.ShowCellNumbersNext()
self.ShowCellNumbersPrev() self.ShowCellNumbersPrev()
else:
self.clearAnnLists()
def ShowCellNumbersCurr(self): def ShowCellNumbersCurr(self):
...@@ -447,6 +448,18 @@ class PlotCanvas(FigureCanvas): ...@@ -447,6 +448,18 @@ class PlotCanvas(FigureCanvas):
self.draw() self.draw()
def clearAnnLists(self):
for ann in self.ann_list:
ann.remove()
self.ann_list = []
for ann in self.ann_list_prev:
ann.remove()
self.ann_list_prev = []
for ann in self.ann_list_next:
ann.remove()
self.ann_list_next = []
def updateplot(self, posx, posy): def updateplot(self, posx, posy):
""" """
it updates the plot once the user clicks on the plot and draws a 4x4 pixel dot it updates the plot once the user clicks on the plot and draws a 4x4 pixel dot
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment