Skip to content

Commit accdc7c

Browse files
escolanojginternational
authored andcommitted
set ::Kratos_AskToTransform to 0 to not not ask if transform and old model, and automatically act like ok was pressed (e.g. to automatize in batch)
1 parent 6e9efd0 commit accdc7c

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

kratos.gid/kratos.tcl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,14 @@ proc Kratos::TransformProblemtype {old_dom old_filespd} {
308308
# Check if current problemtype allows transforms
309309
if {[GiDVersionCmp 14.1.1d] < 0} { W "The minimum GiD version for a transform is '14.1.1d'\n Click Ok to try it anyway (You may lose data)" }
310310

311-
# Ask the user if it's ready to tranform
312-
set w [dialogwin_snit .gid._ask -title [_ "Transform"] -entrytext [_ "The model needs to be upgraded. Do you want to upgrade to new version? You can lose data"]]
313-
set action [$w createwindow]
314-
destroy $w
315-
if { $action < 1 } { return }
311+
# set ::Kratos_AskToTransform to 0 to not not ask if transform and old model, and automatically act like ok was pressed (e.g. to automatize in batch)
312+
if { ![info exists ::Kratos_AskToTransform] || $::Kratos_AskToTransform } {
313+
# Ask the user if it's ready to tranform
314+
set w [dialogwin_snit .gid._ask -title [_ "Transform"] -entrytext [_ "The model needs to be upgraded. Do you want to upgrade to new version? You can lose data"]]
315+
set action [$w createwindow]
316+
destroy $w
317+
if { $action < 1 } { return }
318+
}
316319

317320
# Get the old app
318321
set old_activeapp_node [$old_dom selectNodes "//hiddenfield\[@n='activeapp'\]"]

0 commit comments

Comments
 (0)