Skip to content

Commit

Permalink
reinstate inheritance check (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcellussiegburg committed Nov 14, 2024
1 parent 3fa9e10 commit d2c0516
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Modelling/CdOd/SelectValidCd.hs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ selectValidCdFeedback path drawSettings xs x cdChange =
german [iii|
Klassendiagramm #{x} ist ungültig.
|]
showNamedCd
let sufficient = byName || maybe True isInheritance (remove change)
unless sufficient showNamedCd
paragraph $ case remove change of
Nothing -> lift $ throwM NeverHappens
Just relation -> translate $ do
Expand All @@ -388,6 +389,7 @@ selectValidCdFeedback path drawSettings xs x cdChange =
german [iii|
Klassendiagramm #{x} ist gültig.
|]
let sufficient = byName || onlyInheritances (option cdChange)
if sufficient
then paragraph $ translate $ do
english [iii|
Expand Down Expand Up @@ -427,9 +429,7 @@ selectValidCdFeedback path drawSettings xs x cdChange =
Right {} -> False
Left InvalidInheritance {} -> True
onlyInheritances = all isInheritance . anyRelationships
sufficient = byName || onlyInheritances (option cdChange)
showNamedCd =
unless sufficient $ do
showNamedCd = do
paragraph $ translate $ do
english [iii|
The relationships in the class diagram could be named in the following way:
Expand Down

0 comments on commit d2c0516

Please sign in to comment.