Fix #8062 - fix new file node selection issue
[roobuilder] / src / Builder4 / WindowLeftProps.vala
index eae35e4..1200d93 100644 (file)
@@ -2357,7 +2357,7 @@ public class Xcls_LeftProps : Object
                                var prop = (JsRender.NodeProp) ((Gtk.ListItem)listitem).get_item();
                                if (prop == null || _this.node == null ) {
                                        GLib.error("something is wrong");
-                                       return;
+                                        
                                }
                                if ( _this.node.fqn() == "") {
                                        GLib.debug("node is missing fqn");
@@ -2373,8 +2373,11 @@ public class Xcls_LeftProps : Object
                            
                            var pal = _this.file.project.palete;
                                
-                           string[] opts;
-                           var has_opts = pal.typeOptions(_this.node.fqn(), prop.name, prop.rtype, out opts);
+                           string[] opts = {};
+                         
+                           var has_opts = prop.ptype.can_have_opt_list() ? 
+                               pal.typeOptions(_this.node.fqn(), prop.name, prop.rtype, out opts)
+                               : false;
                            
                            if (!has_opts && prop.ptype == JsRender.NodePropType.RAW) {
                                use_textarea = true;