Index: work/bug_files/TODO/gui_layersel_move.patch =================================================================== --- work/bug_files/TODO/gui_layersel_move.patch (revision 739) +++ work/bug_files/TODO/gui_layersel_move.patch (revision 740) @@ -2,7 +2,7 @@ =================================================================== --- layersel.c (revision 737) +++ layersel.c (working copy) -@@ -499,19 +499,76 @@ +@@ -499,19 +499,77 @@ } } @@ -43,11 +43,14 @@ +/*rnd_trace("dst1=%d step=%d snv=%d blocklen=%d\n", dst, step, snv, snv-src);*/ + + if (step > 0) { ++ if (snv-src > 1) ++ dst+=(snv-src); ++ if (dst >= camv->layers.used) ++ dst = camv->layers.used-1; ++ + /* move dst to jump over own sub-layers when moving up */ + if (((dst+1) < camv->layers.used) && is_sub(dst+1)) { + for(dst++; ((dst+1) < camv->layers.used) && is_sub(dst+1); dst++) ; -+ if (snv-src > 0) -+ dst++; + if (dst >= camv->layers.used) + return; + } @@ -54,9 +57,7 @@ + } + else { + /* move dst to jump over sub-layers of the target when moving down */ -+ if (((dst-1) > 0) && is_sub(dst-1)) { -+ for(dst--; (dst > 0) && is_sub(dst); dst--) ; -+ } ++ for(; (dst > 0) && is_sub(dst); dst--) ; + } + +/*rnd_trace("dst2=%d\n", dst);*/