From 8164710ea44890aa7731f4188993bbea75a0dac8 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 28 May 2019 12:20:29 +0200 Subject: [PATCH] [bugfix] plotting map without picks lead to an exception --- pylot/core/util/array_map.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pylot/core/util/array_map.py b/pylot/core/util/array_map.py index 680dbe45..2198376b 100644 --- a/pylot/core/util/array_map.py +++ b/pylot/core/util/array_map.py @@ -517,7 +517,8 @@ class Array_map(QtGui.QWidget): self.scatter_all_stations() if picks_available: 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) else: self.comboBox_phase.setEnabled(False)