Document a feature that's not obvious in the algorithm and which I now
depend on. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1773 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -73,6 +73,7 @@ public class ButtonUtil
|
||||
{
|
||||
// get the current value and find out where it is in the list
|
||||
int oldval = config.getValue(property, values[0]);
|
||||
// if it's not even in the list, newidx will be 0
|
||||
int newidx = (1 + IntListUtil.indexOf(values, oldval))
|
||||
% values.length;
|
||||
config.setValue(property, values[newidx]);
|
||||
|
||||
Reference in New Issue
Block a user