@@ -67,15 +67,15 @@ (hash-table-set! *cachedata* "runid-to-col" (make-hash-table)) (hash-table-set! *cachedata* "testname-to-row" (make-hash-table)) ;; modify a cell if the data is changed, return #t or-ed with previous if modified, #f elsewise ;; -(define (dcommon:modify-if-different mtrx cell-name new-val prev-changed) +(define (dcommon:modifiy-if-different mtrx cell-name new-val prev-changed) (let ((curr-val (iup:attribute mtrx cell-name))) (if (not (equal? curr-val new-val)) (begin - (iup:attribute-set! mtrx cell-name new-val) + (iup:attribute-set! mtrx cell-name col-name) #t) ;; need a re-draw prev-changed))) ;; TO-DO @@ -144,11 +144,11 @@ (run-name (db:get-value-by-header run-record header "runname")) (col-name (conc (string-intersperse key-vals "\n") "\n" run-name)) (run-path (append key-vals (list run-name)))) (hash-table-set! (dboard:tabdat-run-keys data) run-id run-path) ;; modify cell - but only if changed - (set! changed (dcommon:modify-if-different (dboard:tabdat-runs-matrix data) cellname col-name changed)) + (set! changed (dcommon:modifiy-if-different (dboard:tabdat-runs-matrix data) cellname col-name changed)) (hash-table-set! runid-to-col run-id (list colnum run-record)) ;; Here we update the tests treebox and tree keys (tree:add-node (dboard:tabdat-tests-tree data) "Runs" (append key-vals (list run-name)) userdata: (conc "run-id: " run-id)) (set! colnum (+ colnum 1)))) @@ -203,11 +203,11 @@ userdata: (conc "test-id: " test-id)) (let ((node-num (tree:find-node tb (cons "Runs" test-path))) (color (car (gutils:get-color-for-state-status state status)))) (debug:print 0 *default-log-port* "node-num: " node-num ", color: " color) - (set! changed (dcommon:modify-if-different + (set! changed (dcommon:modifiy-if-different tb (conc "COLOR" node-num) color changed)) ;; (iup:attribute-set! tb (conc "COLOR" node-num) color) @@ -218,21 +218,21 @@ (set! rownum (if (null? rownums) 1 (+ 1 (apply max rownums)))) (hash-table-set! testname-to-row fullname rownum) ;; create the label - (set! changed (dcommon:modify-if-different + (set! changed (dcommon:modifiy-if-different (dboard:tabdat-runs-matrix data) (conc rownum ":" 0) dispname changed)) ;; (iup:attribute-set! (dboard:tabdat-runs-matrix data) ;; (conc rownum ":" 0) dispname) )) ;; set the cell text and color ;; (debug:print 2 *default-log-port* "rownum:colnum=" rownum ":" colnum ", state=" status) - (set! changed (dcommon:modify-if-different + (set! changed (dcommon:modifiy-if-different (dboard:tabdat-runs-matrix data) (conc rownum ":" colnum) (if (member state '("ARCHIVED" "COMPLETED")) status state) @@ -240,11 +240,11 @@ ;; (iup:attribute-set! (dboard:tabdat-runs-matrix data) ;; (conc rownum ":" colnum) ;; (if (member state '("ARCHIVED" "COMPLETED")) ;; status ;; state)) - (set! changed (dcommon:modify-if-different + (set! changed (dcommon:modifiy-if-different (dboard:tabdat-runs-matrix data) (conc "BGCOLOR" rownum ":" colnum) (car (gutils:get-color-for-state-status state status)) changed)) ;; (iup:attribute-set! (dboard:tabdat-runs-matrix data)