Update of /project/mcclim/cvsroot/mcclim/Examples In directory cl-net:/tmp/cvs-serv32548
Modified Files: font-selector.lisp Log Message: Fixed the font-selector demo so that it doesn't crash. The problem was that when the family changes, it tries to initialize the face to one with the same name as the selected one in the old family. When there is no such face in the new family, it got initialized to nil.
However, the demo is still not working properly. Sometimes a displayed face becomes non-clickable, and sometimes two faces are highlighted simultaneously.
--- /project/mcclim/cvsroot/mcclim/Examples/font-selector.lisp 2008/01/21 01:08:58 1.2 +++ /project/mcclim/cvsroot/mcclim/Examples/font-selector.lisp 2009/12/08 05:26:29 1.3 @@ -99,10 +99,11 @@ (reset-list-pane face-list new-faces) (when old-face (setf (gadget-value face-list :invoke-callback t) - (find (font-face-name old-face) - new-faces - :key #'font-face-name - :test #'equal))))) + (or (find (font-face-name old-face) + new-faces + :key #'font-face-name + :test #'equal) + (first new-faces))))))
(defun face-changed (pane value) (declare (ignore pane))