better handling for substract picks
@@ -1355,14 +1355,12 @@ class View(QtGui.QLabel):
self.update_scene(picks_only=True)
def substract_picks(self, path):
- if self._picks:
- print(self._picks)
oldpicks = self._picks.copy()
with open(path, 'r') as f:
regions = yaml.load(f)
self._picks = regions['Centers']
diameter = regions['Diameter']
- print(self._picks)
+
x_cord = np.array([_[0] for _ in self._picks])
y_cord = np.array([_[1] for _ in self._picks])
x_cord_old = np.array([_[0] for _ in oldpicks])
@@ -2701,6 +2699,7 @@ class Window(QtGui.QMainWindow):
self.view.load_picks(path)
def substract_picks(self):
+ if self.view._picks:
path = QtGui.QFileDialog.getOpenFileName(self, 'Load pick regions', filter='*.yaml')
if path:
self.view.substract_picks(path)
