Ensure layer name compatibility in wrapper.tcl

Added check for 'none' layer name to ensure backwards compatibility.
This commit is contained in:
Ahmed Nematallah
2026-05-02 22:50:25 +02:00
committed by GitHub
parent 3c2b04a996
commit bf9ecbde75
+3 -1
View File
@@ -728,7 +728,9 @@ proc magic::toolupdate {win {yesno "yes"} {layerlist ""}} {
# Don't do anything if toolbar is not present # Don't do anything if toolbar is not present
if { $Winopts(${topname},toolbar) == 0 } { return } if { $Winopts(${topname},toolbar) == 0 } { return }
if {$layerlist == ""} { # To ensure backwards compatibility, we check if the
# layer is called none, so avoid naming a layer none.
if {$layerlist == "" || $layerlist == "none"} {
set layerlist $yesno set layerlist $yesno
set yesno "yes" set yesno "yes"
} }