-
-
Notifications
You must be signed in to change notification settings - Fork 216
Labels
bugAn issue in the applicationAn issue in the application
Description
Describe the bug
When an association is removed, properties owned (or at least a member) of the class they refer to are still present in the model browser.
It looks like removal from the model works fine: when the model is reloaded, the properties no longer show
To Reproduce
Steps to reproduce the behavior:
- create 2 classes
- create an association and make both end navigable
- remove the association
- Note that the properties are still visible in the model browser. Interacting with those elements raises exceptions.
Selecting the "ghost" element raises an exception:
gaphor.ui.elementeditor ERROR Could not construct property page for TypedElementPropertyPage
Traceback (most recent call last):
File "/Users/arjan/Development/gaphor/gaphor/ui/elementeditor.py", line 212, in create_pages
page = adapter.construct()
^^^^^^^^^^^^^^^^^^^
File "/Users/arjan/Development/gaphor/gaphor/UML/propertypages.py", line 40, in construct
model = list_of_classifiers(typed_element.model, UML.Classifier)
^^^^^^^^^^^^^^^^^^^
File "/Users/arjan/Development/gaphor/gaphor/core/modeling/base.py", line 89, in model
raise TypeError(
TypeError: Can't retrieve the model since it's not set on construction
gaphor.ui.elementeditor ERROR Could not construct property page for StereotypePage
Traceback (most recent call last):
File "/Users/arjan/Development/gaphor/gaphor/ui/elementeditor.py", line 212, in create_pages
page = adapter.construct()
^^^^^^^^^^^^^^^^^^^
File "/Users/arjan/Development/gaphor/gaphor/UML/profiles/stereotypepropertypages.py", line 33, in construct
stereotypes = UML.recipes.get_stereotypes(subject)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/arjan/Development/gaphor/gaphor/UML/recipes.py", line 125, in get_stereotypes
model = element.model
^^^^^^^^^^^^^
File "/Users/arjan/Development/gaphor/gaphor/core/modeling/base.py", line 89, in model
raise TypeError(
TypeError: Can't retrieve the model since it's not set on construction
Expected behavior
The Model Browser should represent the actual state of the model.
Version
Version of Gaphor: main
Metadata
Metadata
Assignees
Labels
bugAn issue in the applicationAn issue in the application