@@ -796,20 +796,23 @@ (llx (list-ref rec-coords 0)) (urx (list-ref rec-coords 1)) (lly (list-ref rec-coords 2)) (ury (list-ref rec-coords 3))) ;; (print x "\t" y "\t" llx "\t" lly "\t" urx "\t" ury "\t" test-name " " - (if (and (> x llx) + (if (and (eq? pressed 1) + (> x llx) (> y lly) (< x urx) (< y ury)) (let ((patterns (string-split (iup:attribute test-patterns-textbox "VALUE")))) - (if (not (member test-name patterns)) - (let* ((newpatt (string-intersperse (cons test-name patterns) "\n"))) - (iup:attribute-set! test-patterns-textbox "VALUE" newpatt) - (dboard:data-set-test-patts! *data* (dboard:lines->test-patt newpatt)) - (dashboard:update-run-command))))))) + (let* ((newpatt-list (if (member test-name patterns) + (delete test-name patterns) + (cons test-name patterns))) + (newpatt (string-intersperse newpatt-list "\n"))) + (iup:attribute-set! test-patterns-textbox "VALUE" newpatt) + (dboard:data-set-test-patts! *data* (dboard:lines->test-patt newpatt)) + (dashboard:update-run-command)))))) (hash-table-keys tests-info))))))) ;; (print "obj: " obj " btn: " btn " pressed: " pressed " x: " x " y: " y " status: " status)) (iup:frame #:title "Logs" ;; To be replaced with tabs