From: gmungoc Date: Thu, 4 May 2017 15:13:06 +0000 (+0100) Subject: JAL-2510 ensure modified feature type is displayed X-Git-Tag: Release_2_10_2~3^2~104 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1cff2b05f7f6d0a9f035c530b4f353dea2b34760;p=jalview.git JAL-2510 ensure modified feature type is displayed --- diff --git a/src/jalview/gui/FeatureRenderer.java b/src/jalview/gui/FeatureRenderer.java index e608552..5f257c7 100644 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@ -366,6 +366,9 @@ public class FeatureRenderer extends : MessageManager.formatMessage("label.amend_delete_features", new String[] { sequences.get(0).getName() }); + /* + * show the dialog + */ int reply = JvOptionPane.showInternalOptionDialog(Desktop.desktop, mainPanel, title, JvOptionPane.YES_NO_CANCEL_OPTION, JvOptionPane.QUESTION_MESSAGE, null, options, @@ -391,10 +394,17 @@ public class FeatureRenderer extends if (reply == JvOptionPane.NO_OPTION) { + /* + * NO_OPTION corresponds to the Delete button + */ sequences.get(0).getDatasetSequence().deleteFeature(sf); } else if (reply == JvOptionPane.YES_OPTION) { + /* + * YES_OPTION corresponds to the Amend button + */ + boolean typeChanged = !lastFeatureAdded.equals(sf.type); sf.type = lastFeatureAdded; sf.featureGroup = lastFeatureGroupAdded; sf.description = lastDescriptionAdded; @@ -411,6 +421,10 @@ public class FeatureRenderer extends } ffile.parseDescriptionHTML(sf, false); + if (typeChanged) + { + findAllFeatures(); + } } } else