mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-22 09:07:17 +01:00
Added a configuration warning to PaintNodes if they are not a child of a PaintProject.
This commit is contained in:
parent
7fa6ff6433
commit
bf15088dc7
@ -25,6 +25,22 @@ PaintProject *PaintNode::get_paint_project() {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String PaintNode::get_configuration_warning() const {
|
||||||
|
const PaintNode *p = this;
|
||||||
|
|
||||||
|
while (p) {
|
||||||
|
const PaintProject *pp = Object::cast_to<PaintProject>(p);
|
||||||
|
|
||||||
|
if (pp) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
p = Object::cast_to<PaintNode>(p->get_parent());
|
||||||
|
}
|
||||||
|
|
||||||
|
return "This Node should be a child of a PaintProject!";
|
||||||
|
}
|
||||||
|
|
||||||
PaintNode::PaintNode() {
|
PaintNode::PaintNode() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ public:
|
|||||||
|
|
||||||
PaintProject *get_paint_project();
|
PaintProject *get_paint_project();
|
||||||
|
|
||||||
|
String get_configuration_warning() const;
|
||||||
|
|
||||||
PaintNode();
|
PaintNode();
|
||||||
~PaintNode();
|
~PaintNode();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user