Skip to content

Commit f15a649

Browse files
cancel transform
1 parent f91e1a4 commit f15a649

1 file changed

Lines changed: 22 additions & 16 deletions

File tree

kratos.gid/kratos.tcl

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -270,30 +270,36 @@ proc Kratos::LoadModelSPD { filespd } {
270270

271271
} else {
272272
# If the spd versions are equal, partyhard
273+
Kratos::_LoadGo $filespd
273274

274-
# Load the old spd
275-
gid_groups_conds::open_spd_file $filespd
275+
}
276+
277+
}
276278

277-
# Refresh the cache
278-
customlib::UpdateDocument
279+
proc Kratos::_LoadGo {filespd} {
280+
# If the spd versions are equal, partyhard
279281

280-
# Load default intervals (if any)
281-
spdAux::LoadIntervalGroups
282+
# Load the old spd
283+
gid_groups_conds::open_spd_file $filespd
284+
285+
# Refresh the cache
286+
customlib::UpdateDocument
282287

283-
# Reactive the previous app
284-
spdAux::reactiveApp
288+
# Load default intervals (if any)
289+
spdAux::LoadIntervalGroups
285290

286-
apps::ExecuteOnCurrentApp LoadModelEvent $filespd
291+
# Reactive the previous app
292+
spdAux::reactiveApp
287293

288-
# Load default files (if any) (file selection values store the filepaths in the spd)
289-
spdAux::LoadModelFiles
294+
apps::ExecuteOnCurrentApp LoadModelEvent $filespd
290295

291-
# Open the tree
292-
spdAux::OpenTree
296+
# Load default files (if any) (file selection values store the filepaths in the spd)
297+
spdAux::LoadModelFiles
293298

294-
after 500 {set ::Kratos::kratos_private(model_log_folder) [file join [GiD_Info Project ModelName].gid Logs]}
295-
}
299+
# Open the tree
300+
spdAux::OpenTree
296301

302+
after 500 {set ::Kratos::kratos_private(model_log_folder) [file join [GiD_Info Project ModelName].gid Logs]}
297303
}
298304

299305
proc Kratos::Event_EndProblemtype { } {
@@ -384,7 +390,7 @@ proc Kratos::TransformProblemtype {old_dom old_filespd} {
384390
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"]]
385391
set action [$w createwindow]
386392
destroy $w
387-
if { $action < 1 } { return }
393+
if { $action < 1 } { Kratos::_LoadGo $old_filespd; return }
388394
}
389395

390396
# Get the old app

0 commit comments

Comments
 (0)