src/Builder4/WindowLeftTree.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 29 Jan 2024 09:41:53 +0000 (17:41 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 29 Jan 2024 09:41:53 +0000 (17:41 +0800)
src/Builder4/WindowLeftTree.vala

src/Builder4/WindowLeftTree.bjs
src/Builder4/WindowLeftTree.vala

index 5224f80..6445f7f 100644 (file)
    ],
    "| void updateErrors" : [
     "() {",
+    "\tvar ar = this.file.getErrors();",
+    "\tif (ar.size < 1) {",
+    "\t\tthis.removeErrors();",
+    "\t\tthis.last_error_counter = file.error_counter ;",
     "",
+    "\t\treturn;",
+    "\t}",
+    " \tif (this.last_error_counter == file.error_counter) {",
+    "\t\treturn;",
+    "\t}",
     "}"
    ]
   }
index 9627354..e7654af 100644 (file)
@@ -48,7 +48,16 @@ public class Xcls_WindowLeftTree : Object
 
        // user defined functions
        public void updateErrors () {
+               var ar = this.file.getErrors();
+               if (ar.size < 1) {
+                       this.removeErrors();
+                       this.last_error_counter = file.error_counter ;
        
+                       return;
+               }
+               if (this.last_error_counter == file.error_counter) {
+                       return;
+               }
        }
        public void onresize () {