|
From: Harry E. <har...@us...> - 2006-10-04 01:47:31
|
Update of /cvsroot/synclast/client/src/com/synclast/ui In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26449 Modified Files: Container.java Log Message: It appears I missed a couple of cases when doing this patch. This now also handles the case where focussed is not the thing that was removed, but an item thats index will shift downwards from removing the widget under consideration. Index: Container.java =================================================================== RCS file: /cvsroot/synclast/client/src/com/synclast/ui/Container.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** Container.java 3 Oct 2006 10:11:06 -0000 1.40 --- Container.java 3 Oct 2006 18:37:30 -0000 1.41 *************** *** 335,341 **** } //fix focus if necessary ! if(index >= 0 && focused == index) { focused = -1; passFocus(1); } invalidate(); --- 335,345 ---- } //fix focus if necessary ! //if focussed is the widget removed or anything in widgets after us ! //we have to fix focus ! if(focused == index) { focused = -1; passFocus(1); + } else if(focused > index) { + focused--; } invalidate(); |