Commit 65587cd0 authored by Alexander Diewald's avatar Alexander Diewald

HACK: JFX: Enable deleting connectors again

Issue-Ref: 3985
Issue-Url: https://af3-developer.fortiss.org/issues/3985Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent 85c92880
......@@ -5,7 +5,7 @@ EllipseLayoutUIUtils.java 4dd9dbd96a45e8c455c019caa19e4a50f18336af GREEN
FXDNDUtils.java 6ce94e239e68f9e2b3cc0524b072606f4a120076 GREEN
FontUtils.java a167a05bdaa8da9853705cc5134f30f6d81bc9f2 GREEN
GCStateManager.java 983973a92376b5c757c1253b32e33d0666ccdf7b GREEN
LWFXEditorUtils.java 24ec0e23dc4b4e768ede8209335985867bdf0e35 GREEN
LWFXEditorUtils.java 32b62765bec43e610e49d11213d58285ccfe9b06 YELLOW
LayoutDataUIUtils.java c85886ac313a6efb122532218eb134047ffd6631 GREEN
PropertiesViewUtils.java d345b4501c4092228edf1c98e0189317d53aaf22 GREEN
RectangleLayoutUIUtils.java ef4b872bb5b4a51174e9a29d9ef05e7cb3bff3a1 GREEN
......
......@@ -109,6 +109,12 @@ public final class LWFXEditorUtils {
*/
public static boolean stickyConnectorHasVisibleConnections(IConnector connector) {
IHierarchicElement elem = connector.getOwner();
if(elem == null) {
// TODO #3985: Work around NPE when deleting Connectors. We need a proper adapter-based
// solution that deregisters any children from the parent bundle via its decompose
// method before it is deleted.
return true;
}
IHierarchicElementContainer diagram = elem.getContainer();
for(IConnection conn : connector.getIncoming()) {
if(conn.getOwner() == diagram) {
......@@ -129,6 +135,12 @@ public final class LWFXEditorUtils {
*/
public static boolean freeConnectorHasVisibleConnections(IConnector connector) {
IHierarchicElement diagram = connector.getOwner();
if(diagram == null) {
// TODO #3985: Work around NPE when deleting Connectors. We need a proper adapter-based
// solution that deregisters any children from the parent bundle via its decompose
// method before it is deleted.
return true;
}
for(IConnection conn : connector.getIncoming()) {
if(conn.getOwner() == diagram) {
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment