Sfoglia il codice sorgente

Reverted printable null object, seems to cause bugs around and not sure why.
Will have to check better, likely for 3.0

Juan Linietsky 9 anni fa
parent
commit
9714a36e65

+ 1 - 1
core/variant.cpp

@@ -1510,7 +1510,7 @@ Variant::operator String() const {
 
 	switch( type ) {
 
-		case NIL: return "Null";
+		case NIL: return "";
 		case BOOL: return _data._bool ? "True" : "False";
 		case INT: return String::num(_data._int);
 		case REAL: return String::num(_data._real);

+ 2 - 2
modules/visual_script/visual_script.cpp

@@ -1351,8 +1351,8 @@ bool VisualScriptInstance::has_method(const StringName& p_method) const{
 }
 
 
-#define VSDEBUG(m_text) print_line(m_text)
-//#define VSDEBUG(m_text)
+//#define VSDEBUG(m_text) print_line(m_text)
+#define VSDEBUG(m_text)
 
 Variant VisualScriptInstance::call(const StringName& p_method,const Variant** p_args,int p_argcount,Variant::CallError &r_error){
 

+ 4 - 0
tools/editor/create_dialog.cpp

@@ -292,9 +292,12 @@ String CreateDialog::get_selected_type() {
 Object *CreateDialog::instance_selected() {
 
 	TreeItem *selected = search_options->get_selected();
+
 	if (selected) {
 
 		String custom = selected->get_metadata(0);
+
+
 		if (custom!=String()) {
 			if (EditorNode::get_editor_data().get_custom_types().has(custom)) {
 
@@ -323,6 +326,7 @@ Object *CreateDialog::instance_selected() {
 		}
 	}
 
+	print_line("NONE");
 	return NULL;
 }