summaryrefslogtreecommitdiffstats
path: root/editor/multi_node_edit.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/multi_node_edit.h')
-rw-r--r--editor/multi_node_edit.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/editor/multi_node_edit.h b/editor/multi_node_edit.h
index deef88633e..32fe7402fd 100644
--- a/editor/multi_node_edit.h
+++ b/editor/multi_node_edit.h
@@ -36,7 +36,7 @@
class MultiNodeEdit : public RefCounted {
GDCLASS(MultiNodeEdit, RefCounted);
- List<NodePath> nodes;
+ LocalVector<NodePath> nodes;
struct PLData {
int uses = 0;
PropertyInfo info;
@@ -67,6 +67,19 @@ public:
void set_property_field(const StringName &p_property, const Variant &p_value, const String &p_field);
+ // If the nodes selected are the same independently of order then return true.
+ bool is_same_selection(const MultiNodeEdit *p_other) const {
+ if (get_node_count() != p_other->get_node_count()) {
+ return false;
+ }
+ for (int i = 0; i < get_node_count(); i++) {
+ if (!nodes.has(p_other->get_node(i))) {
+ return false;
+ }
+ }
+
+ return true;
+ }
MultiNodeEdit();
};