# HG changeset patch # User Andrey Skvortsov # Date 1482234070 -10800 # Node ID 0d961dc6f58fe8d2a95ef110c0dddc272c7e081a # Parent e8efeeb718abd3ac0b82f3fe66fdaad6b289de63 fix problem that it was impossible to edit SFC jump, if it references non-existent SFC step diff -r e8efeeb718ab -r 0d961dc6f58f editors/Viewer.py --- a/editors/Viewer.py Tue Dec 20 13:26:54 2016 +0300 +++ b/editors/Viewer.py Tue Dec 20 14:41:10 2016 +0300 @@ -2962,7 +2962,12 @@ dialog = wx.SingleChoiceDialog(self.ParentWindow, _("Edit jump target"), _("Please choose a target"), choices, wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL) - dialog.SetSelection(choices.index(jump.GetTarget())) + try: + indx = choices.index(jump.GetTarget()) + dialog.SetSelection(indx) + except ValueError: + pass + if dialog.ShowModal() == wx.ID_OK: value = dialog.GetStringSelection() rect = jump.GetRedrawRect(1, 1)