Update onetcl.cpp

This commit is contained in:
Matthias Hochsteger 2017-09-14 15:54:12 +02:00
parent e50104fa40
commit 341f0bd753

View File

@ -3414,37 +3414,38 @@ const char * ngscript[] = {""
,"{event generate [focus -displayof %W] <MouseWheel> -delta -120}\n" ,"{event generate [focus -displayof %W] <MouseWheel> -delta -120}\n"
,"bind . <MouseWheel> { Ng_MouseMove 0 0 0 [expr {%D/-5}] zoom; redraw }\n" ,"bind . <MouseWheel> { Ng_MouseMove 0 0 0 [expr {%D/-5}] zoom; redraw }\n"
,"bind .ndraw <<Drop:DND_Files>> {\n" ,"bind .ndraw <<Drop:DND_Files>> {\n"
,"set index [string first . %D end-6]\n" ,"set filename [join %D \" \"]\n"
,"set type [string range %D $index+1 end]\n" ,"set index [string last . $filename]\n"
,"set type [string range $filename $index+1 end]\n"
,"set ispde [string match -nocase $type \"pde\"]\n" ,"set ispde [string match -nocase $type \"pde\"]\n"
,"set isgeo [expr max([string match -nocase $type \"geo\"],[string match -nocase $type \"in2d\"])]\n" ,"set isgeo [expr max([string match -nocase $type \"geo\"],[string match -nocase $type \"in2d\"])]\n"
,"set ismesh [expr max([string match -nocase $type \"vol\"],[string match -nocase $type \"vol.gz\"])]\n" ,"set ismesh [expr max([string match -nocase $type \"vol\"],[string match -nocase $type \"vol.gz\"])]\n"
,"set ispy [string match -nocase $type \"py\"]\n" ,"set ispy [string match -nocase $type \"py\"]\n"
,"if {$ispde == 1} {\n" ,"if {$ispde == 1} {\n"
,"AddRecentNGSFile %D;\n" ,"AddRecentNGSFile $filename;\n"
,"NGS_LoadPDE %D;\n" ,"NGS_LoadPDE $filename;\n"
,"SetNumProcHelpMenu\n" ,"SetNumProcHelpMenu\n"
,"set selectvisual mesh;\n" ,"set selectvisual mesh;\n"
,"Ng_SetVisParameters\n" ,"Ng_SetVisParameters\n"
,"}\n" ,"}\n"
,"if {$ispy == 1} {\n" ,"if {$ispy == 1} {\n"
,"AddRecentPYNGSFile %D;\n" ,"AddRecentPYNGSFile $filename;\n"
,"NGS_LoadPy %D;\n" ,"NGS_LoadPy $filename;\n"
,"}\n" ,"}\n"
,"if {$isgeo == 1} {\n" ,"if {$isgeo == 1} {\n"
,"AddRecentFile %D;\n" ,"AddRecentFile $filename;\n"
,"Ng_LoadGeometry %D;\n" ,"Ng_LoadGeometry $filename;\n"
,"Ng_ParseGeometry\n" ,"Ng_ParseGeometry\n"
,"set selectvisual geometry\n" ,"set selectvisual geometry\n"
,"Ng_SetVisParameters\n" ,"Ng_SetVisParameters\n"
,"redraw\n" ,"redraw\n"
,"wm title . [concat \"$progname - \" %D]\n" ,"wm title . [concat \"$progname - \" $filename]\n"
,"set dirname [file dirname %D]\n" ,"set dirname [file dirname $filename]\n"
,"set basefilename [file tail [file rootname %D]]\n" ,"set basefilename [file tail [file rootname $filename]]\n"
,"}\n" ,"}\n"
,"if {$ismesh == 1} {\n" ,"if {$ismesh == 1} {\n"
,"AddRecentMeshFile %D;\n" ,"AddRecentMeshFile $filename;\n"
,"Ng_LoadMesh %D;\n" ,"Ng_LoadMesh $filename;\n"
,"set selectvisual mesh\n" ,"set selectvisual mesh\n"
,"Ng_SetVisParameters\n" ,"Ng_SetVisParameters\n"
,"redraw\n" ,"redraw\n"