[bugfix] plotting map without picks lead to an exception

This commit is contained in:
Marcel Paffrath 2019-05-28 12:20:29 +02:00
parent 74c68d6a14
commit 8164710ea4

View File

@ -517,7 +517,8 @@ class Array_map(QtGui.QWidget):
self.scatter_all_stations() self.scatter_all_stations()
if picks_available: if picks_available:
self.scatter_picked_stations() self.scatter_picked_stations()
self.cbar = self.add_cbar(label='Time relative to first onset ({}) [s]'.format(self._earliest_picktime)) if hasattr(self, 'sc_picked'):
self.cbar = self.add_cbar(label='Time relative to first onset ({}) [s]'.format(self._earliest_picktime))
self.comboBox_phase.setEnabled(True) self.comboBox_phase.setEnabled(True)
else: else:
self.comboBox_phase.setEnabled(False) self.comboBox_phase.setEnabled(False)