# HG changeset patch # User jrice_foo8@netbeans.org # Date 1202729161 0 # Node ID 93b93c6be87af703a91d7f0bc48d8eedb2bcde46 # Parent 686cb75943fd75f7547d2f7ffda1b0a6ae78aa24 #126803: Username priorities and changes - last change was not being persisted from the Properties dialog, unless you clicked back on a row - Ok now handles this diff -r 686cb75943fd -r 93b93c6be87a mercurial/src/org/netbeans/modules/mercurial/ui/properties/HgProperties.java --- a/mercurial/src/org/netbeans/modules/mercurial/ui/properties/HgProperties.java Mon Feb 11 08:58:49 2008 +0000 +++ b/mercurial/src/org/netbeans/modules/mercurial/ui/properties/HgProperties.java Mon Feb 11 11:26:01 2008 +0000 @@ -178,6 +178,14 @@ public class HgProperties implements Lis } private int lastIndex = -1; + + + public void updateLastSelection () { + HgPropertiesNode[] hgPropertiesNodes = propTable.getNodes(); + if (lastIndex >= 0) { + hgPropertiesNodes[lastIndex].setValue(getPropertyValue()); + } + } public void valueChanged (ListSelectionEvent e) { int index = propTable.getTable().getSelectedRow(); diff -r 686cb75943fd -r 93b93c6be87a mercurial/src/org/netbeans/modules/mercurial/ui/properties/PropertiesAction.java --- a/mercurial/src/org/netbeans/modules/mercurial/ui/properties/PropertiesAction.java Mon Feb 11 08:58:49 2008 +0000 +++ b/mercurial/src/org/netbeans/modules/mercurial/ui/properties/PropertiesAction.java Mon Feb 11 11:26:01 2008 +0000 @@ -107,6 +107,7 @@ public class PropertiesAction extends Co dialog.pack(); dialog.setVisible(true); if (dd.getValue() == okButton) { + hgProperties.updateLastSelection(); hgProperties.setProperties(); } }