fix problem that it was impossible to edit SFC jump, if it references non-existent SFC step
--- 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)