From 496ea4a41c1737c7061a8eb1ca0bf57c3bf68dbc Mon Sep 17 00:00:00 2001
From: Jan Bliznicenko <jan.bliznicenko@fit.cvut.cz>
Date: Sat, 23 Nov 2024 21:42:53 +0100
Subject: [PATCH] Remove invalid diagram element instead of replacing it by
 backup

---
 .../OpenPonk-ClassEditor/OPTUmlBaseController.trait.st |  4 ++--
 .../OpenPonk-ClassEditor/OPUmlAttributeLabel.class.st  | 10 ----------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/repository/OpenPonk-ClassEditor/OPTUmlBaseController.trait.st b/repository/OpenPonk-ClassEditor/OPTUmlBaseController.trait.st
index dba9dbd4..9e0e37bd 100644
--- a/repository/OpenPonk-ClassEditor/OPTUmlBaseController.trait.st
+++ b/repository/OpenPonk-ClassEditor/OPTUmlBaseController.trait.st
@@ -89,8 +89,8 @@ OPTUmlBaseController >> validateProperty: aProperty [
 
 	aProperty ifNil: [ ^ self ].
 	(aProperty association isNotNil and: [
-		 (aProperty respondsTo: #oclIsKindOf:) not or: [
-			 (aProperty oclIsKindOf: #Classifier) not ] ]) ifTrue: [
+		 (aProperty type respondsTo: #oclIsKindOf:) not or: [
+			 (aProperty type oclIsKindOf: #Classifier) not ] ]) ifTrue: [
 		self validationFailedAssociationPropertyWithoutClassifierType:
 			aProperty ].
 	aProperty owningAssociation
diff --git a/repository/OpenPonk-ClassEditor/OPUmlAttributeLabel.class.st b/repository/OpenPonk-ClassEditor/OPUmlAttributeLabel.class.st
index 52907d18..13be9120 100644
--- a/repository/OpenPonk-ClassEditor/OPUmlAttributeLabel.class.st
+++ b/repository/OpenPonk-ClassEditor/OPUmlAttributeLabel.class.st
@@ -5,13 +5,3 @@ Class {
 	#package : 'OpenPonk-ClassEditor',
 	#tag : 'Shapes'
 }
-
-{ #category : 'serialization' }
-OPUmlAttributeLabel >> backupModelElementFor: aModelReference [
-
-	^ OPUMLProperty new
-		  uuid: aModelReference uuid;
-		  name: '!!!__FAILED_TO_LOAD__!!!';
-		  owningClass: self owningElement owningElement modelElement;
-		  yourself
-]