Skip to content

Commit

Permalink
solve bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gamaanderson committed Mar 10, 2017
1 parent aee22a2 commit ca01c80
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion artview/components/display_select_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def closeEvent(self, QCloseEvent):
warnings.warn(
"Reseting SelectRegion fails with following error\n" + error)
self.disconnect()
super(SelectRegion, self).closeEvent(QCloseEvent)
super(DisplaySelectRegion, self).closeEvent(QCloseEvent)

def displayStats(self):
'''Calculate basic statistics of the SelectRegion list.'''
Expand Down
4 changes: 3 additions & 1 deletion artview/components/select_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def resetSelectRegion(self):
'''Clear the SelectRegion lines from plot and reset things.'''
if self.polys:
for poly in self.polys:
for i in xrange(len(poly)):
for i in range(len(poly)):
try:
poly[i].remove()
except:
Expand All @@ -350,6 +350,8 @@ def closeEvent(self, QCloseEvent):
error = traceback.format_exc()
warnings.warn(
"Reseting SelectRegion fails with following error\n" + error)
import warnings
warnings.warn("a waring\n")
self.disconnect()
super(SelectRegion, self).closeEvent(QCloseEvent)

Expand Down
2 changes: 1 addition & 1 deletion artview/modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def manual_unfold_mode():

def manual_filter_mode():
change_mode(
[FileNavigator, RadarDisplay, SelectRegion, ManualFilter],
[FileNavigator, RadarDisplay, SelectRegion, ManualEdit],
[
((0, 'Vradar'), (1, 'Vradar')),
((1, 'VplotAxes'), (2, 'VplotAxes')),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from ..core import Component, Variable, common, QtWidgets, QtCore, componentsList


class ManualFilter(Component):
class ManualEdit(Component):
'''
Use of Points to remove data from Radar.
'''
Expand All @@ -34,12 +34,12 @@ class ManualFilter(Component):
def guiStart(self, parent=None):
'''Graphical interface for starting this class.'''
kwargs, independent = \
common._SimplePluginStart("ManualFilter").startDisplay()
common._SimplePluginStart("ManualEdit").startDisplay()
kwargs['parent'] = parent
return self(**kwargs), independent

def __init__(self, Vradar=None, Vpoints=None, Vfield=None,
Vgatefilter=None, name=" ManualFilter", parent=None):
Vgatefilter=None, name=" ManualEdit", parent=None):
'''Initialize the class to create the interface.
Parameters
Expand All @@ -63,7 +63,7 @@ def __init__(self, Vradar=None, Vpoints=None, Vfield=None,
If None, then Qt owns, otherwise associated with parent PyQt
instance.
'''
super(ManualFilter, self).__init__(name=name, parent=parent)
super(ManualEdit, self).__init__(name=name, parent=parent)

if Vradar is None:
self.Vradar = Variable(None)
Expand Down Expand Up @@ -258,4 +258,4 @@ def NewField(self, variable, strong):
self.fieldBox.setCurrentIndex(idx)


_plugins = [ManualFilter]
_plugins = [ManualEdit]

0 comments on commit ca01c80

Please sign in to comment.