summaryrefslogtreecommitdiff
path: root/setText.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-19 14:41:32 -0600
committerJeff Carr <[email protected]>2024-02-19 14:41:32 -0600
commit10eb3685d71a8b4f74a6b3430ef54d56d9aa625d (patch)
treea76b5908c74863be81d0178ae6efeb26dd90f0f6 /setText.go
parent337a55eaac4ffc516c26286b04b039533adb157d (diff)
try out a "Mirror" concept for widgets
Diffstat (limited to 'setText.go')
-rw-r--r--setText.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/setText.go b/setText.go
index a3f7de9..67b7f4c 100644
--- a/setText.go
+++ b/setText.go
@@ -17,7 +17,13 @@ func (n *Node) SetLabel(label string) *Node {
case widget.Button:
n.label = label
case widget.Label:
- n.label = label
+ if n.IsMirror() {
+ // n is a mirror of something else
+ log.Log(WARN, "SetLabel() error this widget is a mirror", n.id)
+ } else {
+ n.label = label
+ n.updateMirrors()
+ }
case widget.Group:
n.label = label
case widget.Window: