fix(G2DMainFrame): handle IllegalArgumentException when setting component z-order
This commit is contained in:
@@ -521,8 +521,13 @@ public class G2DMainFrame extends Frame {
|
|||||||
COMPONENT_Z_ORDER_PAIRS.sort((a, b) -> Integer.compare(b.effectiveLayer, a.effectiveLayer));
|
COMPONENT_Z_ORDER_PAIRS.sort((a, b) -> Integer.compare(b.effectiveLayer, a.effectiveLayer));
|
||||||
|
|
||||||
for (int i = 0; i < COMPONENT_Z_ORDER_PAIRS.size(); i++) {
|
for (int i = 0; i < COMPONENT_Z_ORDER_PAIRS.size(); i++) {
|
||||||
|
try {
|
||||||
this.setComponentZOrder(COMPONENT_Z_ORDER_PAIRS.get(i).component, i);
|
this.setComponentZOrder(COMPONENT_Z_ORDER_PAIRS.get(i).component, i);
|
||||||
}
|
}
|
||||||
|
catch (final IllegalArgumentException e) {
|
||||||
|
LOGGER.warn("Failed to set component z-order: {}", e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
COMPONENT_Z_ORDER_PAIRS.clear();
|
COMPONENT_Z_ORDER_PAIRS.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user