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 R. Timothy Edwards
parent c3ee33e9a1
commit fa80458d80
1 changed files with 3 additions and 1 deletions

View File

@ -728,7 +728,9 @@ proc magic::toolupdate {win {yesno "yes"} {layerlist ""}} {
# Don't do anything if toolbar is not present
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 yesno "yes"
}