diff options
author | Colin Okay <colin@cicadas.surf> | 2022-07-01 19:18:43 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-07-01 19:18:43 -0500 |
commit | 123a33f9061353ae2fd88b4b563c746d5db5fc8b (patch) | |
tree | 32cf269b9e7785f4c49f024f36c50b4dda611f3b /src/interactive/button.lisp | |
parent | 08a29ff775cf841a80ed2433ab219ccc953835ef (diff) |
[bugfix] temporary prohibition of reasigning button faces
Diffstat (limited to 'src/interactive/button.lisp')
-rw-r--r-- | src/interactive/button.lisp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/interactive/button.lisp b/src/interactive/button.lisp index a885ef0..e8fd4fa 100644 --- a/src/interactive/button.lisp +++ b/src/interactive/button.lisp @@ -29,9 +29,12 @@ (defmethod (setf closer-mop:slot-value-using-class) :before (newval class (button button) slot) - (case (closer-mop:slot-definition-name slot) - ((up down bg) - (error "Swapping Button Faces Not Presently Supported")))) + (let ((slot-name + (closer-mop:slot-definition-name slot))) + (case slot-name + ((up down bg) + (when (slot-boundp button slot-name) + (error "Swapping Button Faces Not Presently Supported")))))) (defmethod initialize-instance :after ((button button) &key) (add-handler button #'button-pressed) |