return the correct immutability
This commit is contained in:
parent
e03570227c
commit
12a766795e
@ -356,12 +356,21 @@ Types::Types::ImmutabilityType Applet::immutability() const
|
||||
//Returning the more strict immutability between the applet immutability, Containment and Corona
|
||||
Types::ImmutabilityType upperImmutability = Types::Mutable;
|
||||
|
||||
if (!isContainment()) {
|
||||
if (isContainment()) {
|
||||
Corona *cor = static_cast<Containment*>(const_cast<Applet*>(this))->corona();
|
||||
if (cor) {
|
||||
upperImmutability = cor->immutability();
|
||||
}
|
||||
} else {
|
||||
const Containment *cont = containment();
|
||||
if (cont) {
|
||||
if (cont->corona()) {
|
||||
upperImmutability = cont->corona()->immutability();
|
||||
} else {
|
||||
upperImmutability = cont->immutability();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (upperImmutability != Types::Mutable) {
|
||||
// it's either system or user immutable, and we already check for local system immutability,
|
||||
|
Loading…
Reference in New Issue
Block a user