Revision 46174
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
484 | 484 |
tooltip="_Hide_active_layers" |
485 | 485 |
accelerator="" |
486 | 486 |
/> |
487 |
<action
|
|
487 |
<action |
|
488 | 488 |
name="active-layer-bring-front" |
489 | 489 |
label="_Bring_to_front" |
490 | 490 |
position="600100600" |
491 | 491 |
action-command="active-layer-bring-front" |
492 | 492 |
icon="active-layer-bring-front" |
493 | 493 |
tooltip="_Bring_to_front" |
494 |
accelerator="" |
|
494 |
accelerator="Alt-PgUp"
|
|
495 | 495 |
/> |
496 |
<action
|
|
496 |
<action |
|
497 | 497 |
name="active-layer-send-back" |
498 | 498 |
label="_Send_to_back" |
499 | 499 |
position="600100700" |
500 | 500 |
action-command="active-layer-send-back" |
501 | 501 |
icon="active-layer-send-back" |
502 | 502 |
tooltip="_Send_back" |
503 |
accelerator="" |
|
503 |
accelerator="Alt-PgDn"
|
|
504 | 504 |
/> |
505 |
<action
|
|
505 |
<action |
|
506 | 506 |
name="active-layer-move-ahead" |
507 | 507 |
label="_Move_ahead" |
508 | 508 |
position="600100800" |
509 | 509 |
action-command="active-layer-move-ahead" |
510 | 510 |
icon="active-layer-move-ahead" |
511 | 511 |
tooltip="_Move_ahead" |
512 |
accelerator="" |
|
512 |
accelerator="Alt-Up"
|
|
513 | 513 |
/> |
514 |
<action
|
|
514 |
<action |
|
515 | 515 |
name="active-layer-move-behind" |
516 | 516 |
label="_Move_behind" |
517 | 517 |
position="600100900" |
518 | 518 |
action-command="active-layer-move-behind" |
519 | 519 |
icon="active-layer-move-behind" |
520 | 520 |
tooltip="_Move_behind" |
521 |
accelerator="" |
|
521 |
accelerator="Alt-Down"
|
|
522 | 522 |
/> |
523 | 523 |
|
524 | 524 |
<action |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/ViewControls.java | ||
---|---|---|
440 | 440 |
for (FLayer layer : actives) { |
441 | 441 |
FLayers layers = layer.getParentLayer(); |
442 | 442 |
int position = this.getPositionInFlayersGroup(layers, layer); |
443 |
int newPosition = getValidTocPosition(position, layers, -1); |
|
444 |
layers.moveTo(position,newPosition); |
|
443 |
if( position < 1 ) { |
|
444 |
FLayers layersParent = layers.getParentLayer(); |
|
445 |
if( layersParent!=null ) { |
|
446 |
int layersPosition = this.getPositionInFlayersGroup(layersParent, layers); |
|
447 |
int newPosition = layersParent.size()-getValidTocPosition(layersPosition, layersParent, -1)-1; |
|
448 |
layersParent.add(newPosition, layer); |
|
449 |
layers.remove(layer); |
|
450 |
} |
|
451 |
} else { |
|
452 |
int newPosition = getValidTocPosition(position, layers, -1); |
|
453 |
layers.moveTo(position,newPosition); |
|
454 |
} |
|
445 | 455 |
} |
446 | 456 |
List<FLayers> flayersGroup = getFirstLevelGroupsFromLayers(groupLayers); |
447 | 457 |
for (FLayers fLayer : flayersGroup) { |
... | ... | |
454 | 464 |
for (FLayer layer : actives) { |
455 | 465 |
FLayers layers = layer.getParentLayer(); |
456 | 466 |
int position = this.getPositionInFlayersGroup(layers, layer); |
457 |
int newPosition = getValidTocPosition(position, layers, +1); |
|
458 |
layers.moveTo(position, newPosition); |
|
467 |
if( position >= layers.size()-1 ) { |
|
468 |
FLayers layersParent = layers.getParentLayer(); |
|
469 |
if( layersParent!=null ) { |
|
470 |
int layersPosition = this.getPositionInFlayersGroup(layersParent, layers); |
|
471 |
int newPosition = layersParent.size() - layersPosition + 1; |
|
472 |
if (newPosition < 0) { |
|
473 |
layersParent.add(0, layer); |
|
474 |
} else if (newPosition >= layersParent.getLayersCount()) { |
|
475 |
layersParent.add(layersParent.size(),layer); |
|
476 |
} else { |
|
477 |
layersParent.add(newPosition, layer); |
|
478 |
} |
|
479 |
// int newPosition = layersParent.size()-getValidTocPosition(layersPosition, layersParent, +1); |
|
480 |
// layersParent.add(newPosition, layer); |
|
481 |
layers.remove(layer); |
|
482 |
} |
|
483 |
} else { |
|
484 |
int newPosition = getValidTocPosition(position, layers, +1); |
|
485 |
layers.moveTo(position, newPosition); |
|
486 |
} |
|
459 | 487 |
} |
460 | 488 |
List<FLayers> flayersGroup = getFirstLevelGroupsFromLayers(groupLayers); |
461 | 489 |
for (FLayers fLayer : flayersGroup) { |
Also available in: Unified diff