From 2c4c05767f8b17d32d9c2093c5a152c3b19f4292 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 3 Dec 2018 10:41:37 +0000 Subject: [PATCH] JAL-3167 end cell editing on cancel in colour chooser --- src/jalview/gui/FeatureSettings.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 3cd6c21..b82cf86 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -1739,13 +1739,20 @@ public class FeatureSettings extends JPanel * simple colour chooser */ String ttl = MessageManager.getString("label.select_colour"); - ColourChooserListener listener = new ColourChooserListener() { + ColourChooserListener listener = new ColourChooserListener() + { @Override public void colourSelected(Color c) { currentColor = new FeatureColour(c); me.table.setValueAt(currentColor, rowSelected, COLOUR_COLUMN); + fireEditingStopped(); } + @Override + public void cancel() + { + fireEditingStopped(); + } }; JalviewColourChooser.showColourChooser(button, ttl, currentColor.getColour(), listener); } @@ -1761,7 +1768,6 @@ public class FeatureSettings extends JPanel chooser.requestFocus(); } chooser.addActionListener(this); - // Make the renderer reappear. fireEditingStopped(); } } -- 1.7.10.2