Fix #8000 - left tree and file open
[roobuilder] / src / Builder4 / WindowLeftProps.bjs
index 736d2df..6e91f28 100644 (file)
         "\t\t\t\t}",
         "\t\t\t\t// should be columnlistview",
         "\t\t\t\tchild = child.get_first_child(); ",
-        "\t\t\t    GLib.debug(\"header height=%d\", h);",
+        "\t\t\t    //GLib.debug(\"header height=%d\", h);",
         "\t\t\t\theader_height =  h;",
         "\t\t\t\t",
         "\t\t\t\treading_header = false;",
-        "\t\t\t\t",
+        "\t\t\t\tcontinue;",
         "\t        }",
         "\t        ",
         "\t\t    if (child.get_type().name() != \"GtkColumnViewRowWidget\") {",
         "\t\t    ",
         "\t\t    line_no++;",
         "\t\t\tvar hh = child.get_height();",
+        "\t\t\tif (child.has_css_class(\"node-err\") || ",
+        "\t\t\t\tchild.has_css_class(\"node-warn\") || ",
+        "\t\t\t\tchild.has_css_class(\"node-depr\")) {",
+        "\t\t\t\thh += 10;",
+        "\t\t\t",
+        "\t\t\t}",
+        "\t\t\t",
         "\t\t\t//child.get_allocation(out alloc);",
         "\t\t\t//GLib.debug(\"got cell xy = %d,%d  w,h= %d,%d\", alloc.x, alloc.y, alloc.width, alloc.height);",
         "\t\t\t//GLib.debug(\"row %d y= %d %s\", line_no, (int) (header_height + alloc.y),",
     "",
     "}"
    ],
-   "| void a_addProp" : [
-    " (JsRender.NodeProp prop) {",
-    "      // info includes key, val, skel, etype..",
-    "      //console.dump(info);",
-    "        //type = info.type.toLowerCase();",
-    "        //var data = this.toJS();",
-    "          ",
-    "              ",
-    "    if (prop.ptype == JsRender.NodePropType.LISTENER) {",
-    "        if (this.node.listeners.has_key(prop.name)) {",
-    "            return;",
-    "        }",
-    "        this.node.listeners.set(prop.name,prop);",
-    "    } else  {",
-    "         assert(this.node != null);",
-    "         assert(this.node.props != null);",
-    "        if (this.node.props.has_key(prop.to_index_key())) {",
-    "            return;",
-    "        }",
-    "        this.node.props.set(prop.to_index_key(),prop);",
-    "    }",
-    "            ",
-    "      ",
-    "    // add a row???",
-    "    this.load(this.file, this.node);",
-    "    ",
-    "    ",
-    "     ",
-    "    ",
-    "    GLib.debug(\"trying to find new iter\");",
-    " ",
-    "    ",
-    "              ",
-    "}",
-    ""
-   ],
    "| void deleteSelected" : [
     " () {",
     "    ",
     "\tvar reading_header = true;",
     " ",
     "\twhile (child != null) {",
-    "\t\tGLib.debug(\"Got %s\", child.get_type().name());",
+    "\t\t//GLib.debug(\"Got %s\", child.get_type().name());",
     "\t   ",
     "\t   if (reading_header) {",
     "\t\t\t",
     "\tvar file = this.file;",
     "\tvar ar = file.getErrors();",
     "\tif (ar.size < 1) {",
-    "\t\tthis.removeErrors();",
+    "\t\tif (this.last_error_counter != file.error_counter) {",
+    "\t\t\tthis.removeErrors();",
+    "\t\t}",
+    "",
     "\t\tthis.last_error_counter = file.error_counter ;",
     "",
     "\t\treturn;",