diff options
author | Sven Göthel <[email protected]> | 2024-02-04 07:37:34 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-02-04 07:37:34 +0100 |
commit | 5bf50ce8876df289c362aa270fbfabccd571f29e (patch) | |
tree | 7b86b9f46e896bd9b716ff6461423d914b19b544 | |
parent | 5e24fc150f505fc5e08fc6c8cc9274ecea66b28b (diff) |
GraphUI RangedGroup: Keep position @ validate()
Positional change could occurre in case the content has changed.
However, our positional slider would not reflect this and the sliding view should stay stable.
Test: UIMediaGrid01 having one player tile zoomed and returned.
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java b/src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java index 211ebe7e9..307b66863 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java +++ b/src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java @@ -137,7 +137,7 @@ public class RangedGroup extends Widget { vertSlider = null; } this.onInit( (final Shape shape) -> { - content.move(contentPosZero.x(), contentPosZero.y(), 0); + content.moveTo(contentPosZero.x(), contentPosZero.y(), 0); return true; }); } @@ -153,6 +153,7 @@ public class RangedGroup extends Widget { @Override protected void validateImpl(final GL2ES2 gl, final GLProfile glp) { if( isShapeDirty() ) { + final Vec3f pos = content.getPosition().copy(); // preserve content position super.validateImpl(gl, glp); final AABBox cb = content.getBounds(); @@ -170,6 +171,7 @@ public class RangedGroup extends Widget { contentPosZero.setY( contentSize.y() - cb.getHeight() ); } } + content.moveTo( pos ); } } @Override |