diff options
author | Sven Gothel <[email protected]> | 2023-09-16 14:00:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-09-16 14:00:45 +0200 |
commit | d1cfa99135154e8e651e86ebc48a0f635fad38aa (patch) | |
tree | 57d12f41cdb92de894f8d93c23c72d50196bc84e /src | |
parent | 4e94635bb7d0f7161d587dcd923b1c1ab275e7bf (diff) |
GraphUI Group: Override isShapeDirty(), performing a deep dirty state update on all group member to allow validate to function
Diffstat (limited to 'src')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/Group.java | 13 | ||||
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/Shape.java | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Group.java b/src/graphui/classes/com/jogamp/graph/ui/Group.java index b131e8863..95a829b3e 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Group.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Group.java @@ -238,6 +238,19 @@ public class Group extends Shape implements Container { } @Override + protected boolean isShapeDirty() { + // Deep dirty state update: + // - Ensure all group member's dirty state is updated + // - Allowing all group member's validate to function + for(final Shape s : shapes) { + if( s.isShapeDirty() ) { + markShapeDirty(); + } + } + return super.isShapeDirty(); + } + + @Override protected void validateImpl(final GLProfile glp, final GL2ES2 gl) { if( isShapeDirty() ) { // box has been reset diff --git a/src/graphui/classes/com/jogamp/graph/ui/Shape.java b/src/graphui/classes/com/jogamp/graph/ui/Shape.java index 9b45cd36d..843c73384 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Shape.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Shape.java @@ -407,7 +407,7 @@ public abstract class Shape { } } - protected final boolean isShapeDirty() { + protected boolean isShapeDirty() { return 0 != ( dirty & DIRTY_SHAPE ) ; } protected final boolean isStateDirty() { |