Skip to content

Commit

Permalink
#1771 Check and create an association asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed Sep 26, 2022
1 parent 1e3c543 commit 9bbee20
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -393,15 +393,15 @@ public void handleDataSourceEvent(DBPEvent event)
} else if (entityAssociation != null) {
ERDEntity erdEntity = diagram.getEntity(entity);
ERDEntity targetEntity = diagram.getEntity(entityAssociation.getAssociatedEntity());
if (erdEntity != null &&
erdEntity.getAssociation(entityAssociation) == null &&
erdEntity.getReferenceAssociation(entityAssociation) == null)
{
DBSEntityAssociation addedAssociation = entityAssociation;
UIUtils.asyncExec(() -> {
DBSEntityAssociation addedAssociation = entityAssociation;
UIUtils.asyncExec(() -> {
if (erdEntity != null &&
erdEntity.getAssociation(addedAssociation) == null &&
erdEntity.getReferenceAssociation(addedAssociation) == null)
{
new ERDAssociation(addedAssociation, erdEntity, targetEntity, true);
});
}
}
});
} else {
// New entity. Add it if it has the same object container
// or if this entity was created from the same editor
Expand Down

0 comments on commit 9bbee20

Please sign in to comment.