aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interactive/button.lisp
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-07-01 19:18:43 -0500
committerColin Okay <colin@cicadas.surf>2022-07-01 19:18:43 -0500
commit123a33f9061353ae2fd88b4b563c746d5db5fc8b (patch)
tree32cf269b9e7785f4c49f024f36c50b4dda611f3b /src/interactive/button.lisp
parent08a29ff775cf841a80ed2433ab219ccc953835ef (diff)
[bugfix] temporary prohibition of reasigning button faces
Diffstat (limited to 'src/interactive/button.lisp')
-rw-r--r--src/interactive/button.lisp9
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)