mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0023275: restore command set name of result variable incorrectly if absolute path is used
Command restore corrected to set default name of the shape equal to filename without extension Test case added (demo draw restore)
This commit is contained in:
@@ -281,7 +281,10 @@ proc save {name {file ""}} {
|
||||
help save {save variable [filename]} "DRAW Variables management"
|
||||
|
||||
proc restore {file {name ""}} {
|
||||
if {$name == ""} {set name $file}
|
||||
if {$name == ""} {
|
||||
# if name is not given explicitly, use name of the file w/o extension
|
||||
set name [file rootname [file tail $file]]
|
||||
}
|
||||
global Draw_DataDir
|
||||
uplevel #0 "brestore [file join $Draw_DataDir $file ] $name"
|
||||
return $name
|
||||
|
Reference in New Issue
Block a user