diff options
| -rw-r--r-- | core/object.h | 9 | ||||
| -rw-r--r-- | editor/multi_node_edit.cpp | 4 | 
2 files changed, 12 insertions, 1 deletions
diff --git a/core/object.h b/core/object.h index 1e0b22c086..e6c5b7c5b9 100644 --- a/core/object.h +++ b/core/object.h @@ -179,6 +179,15 @@ struct PropertyInfo {  			usage(PROPERTY_USAGE_DEFAULT) {  	} +	bool operator==(const PropertyInfo &p_info) const { +		return ((type == p_info.type) && +				(name == p_info.name) && +				(class_name == p_info.class_name) && +				(hint == p_info.hint) && +				(hint_string == p_info.hint_string) && +				(usage == p_info.usage)); +	} +  	bool operator<(const PropertyInfo &p_info) const {  		return name < p_info.name;  	} diff --git a/editor/multi_node_edit.cpp b/editor/multi_node_edit.cpp index 6af7e4bd00..85e47594a8 100644 --- a/editor/multi_node_edit.cpp +++ b/editor/multi_node_edit.cpp @@ -152,7 +152,9 @@ void MultiNodeEdit::_get_property_list(List<PropertyInfo> *p_list) const {  				datas.push_back(usage.getptr(F->get().name));  			} -			usage[F->get().name].uses++; +			// Make sure only properties with the same exact PropertyInfo data will appear +			if (usage[F->get().name].info == F->get()) +				usage[F->get().name].uses++;  		}  		nc++;  |