From 6e40811b012d45c4ac2ba52f9f92d871cc63a866 Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 17 Jun 2021 15:34:23 +0200 Subject: [PATCH] [minor] small bugfix --- pylot/core/util/widgets.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index fd2b4eab..07be120b 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -2703,8 +2703,11 @@ class PickDlg(QDialog): ax.plot(mpp, ylims[0], color=color, marker='^', zorder=baseorder + 3) # append phase text (if textOnly: draw with current ylims) self.phaseText.append(ax.text(mpp, ylims[1], phase, color=color, zorder=baseorder + 10)) - # indicate first motion - self.phaseText.append(ax.text(mpp - 0.03 * mpp, ylims[1] - ylims[1] / 12, picks['fm'], color=color, zorder=baseorder + 10)) + # indicate first motion + fm = picks.get('fm') + if fm: + self.phaseText.append(ax.text(mpp - 0.03 * mpp, ylims[1] - ylims[1] / 12, fm, color=color, + zorder=baseorder + 10)) ax.legend(loc=1) def connect_mouse_motion(self):