mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-13 22:50:33 +05:00
Fix TKDND on Windows
This commit is contained in:
parent
69917bae25
commit
e50104fa40
@ -147,40 +147,42 @@ bind . <MouseWheel> { Ng_MouseMove 0 0 0 [expr {%D/-5}] zoom; redraw }
|
|||||||
# Drop callbacks:
|
# Drop callbacks:
|
||||||
bind .ndraw <<Drop:DND_Files>> {
|
bind .ndraw <<Drop:DND_Files>> {
|
||||||
#tk_messageBox -message "Dropped files: \"[join %D {, }]\""
|
#tk_messageBox -message "Dropped files: \"[join %D {, }]\""
|
||||||
|
set filename [join %D " "]
|
||||||
|
|
||||||
#%W state !active
|
#%W state !active
|
||||||
set index [string first . %D end-6]
|
set index [string last . $filename]
|
||||||
#tk_messageBox -message $index
|
#tk_messageBox -message $index
|
||||||
set type [string range %D $index+1 end]
|
set type [string range $filename $index+1 end]
|
||||||
# tk_messageBox -message $type
|
# tk_messageBox -message $type
|
||||||
set ispde [string match -nocase $type "pde"]
|
set ispde [string match -nocase $type "pde"]
|
||||||
set isgeo [expr max([string match -nocase $type "geo"],[string match -nocase $type "in2d"])]
|
set isgeo [expr max([string match -nocase $type "geo"],[string match -nocase $type "in2d"])]
|
||||||
set ismesh [expr max([string match -nocase $type "vol"],[string match -nocase $type "vol.gz"])]
|
set ismesh [expr max([string match -nocase $type "vol"],[string match -nocase $type "vol.gz"])]
|
||||||
set ispy [string match -nocase $type "py"]
|
set ispy [string match -nocase $type "py"]
|
||||||
if {$ispde == 1} {
|
if {$ispde == 1} {
|
||||||
AddRecentNGSFile %D;
|
AddRecentNGSFile $filename;
|
||||||
NGS_LoadPDE %D;
|
NGS_LoadPDE $filename;
|
||||||
SetNumProcHelpMenu
|
SetNumProcHelpMenu
|
||||||
set selectvisual mesh;
|
set selectvisual mesh;
|
||||||
Ng_SetVisParameters
|
Ng_SetVisParameters
|
||||||
}
|
}
|
||||||
if {$ispy == 1} {
|
if {$ispy == 1} {
|
||||||
AddRecentPYNGSFile %D;
|
AddRecentPYNGSFile $filename;
|
||||||
NGS_LoadPy %D;
|
NGS_LoadPy $filename;
|
||||||
}
|
}
|
||||||
if {$isgeo == 1} {
|
if {$isgeo == 1} {
|
||||||
AddRecentFile %D;
|
AddRecentFile $filename;
|
||||||
Ng_LoadGeometry %D;
|
Ng_LoadGeometry $filename;
|
||||||
Ng_ParseGeometry
|
Ng_ParseGeometry
|
||||||
set selectvisual geometry
|
set selectvisual geometry
|
||||||
Ng_SetVisParameters
|
Ng_SetVisParameters
|
||||||
redraw
|
redraw
|
||||||
wm title . [concat "$progname - " %D]
|
wm title . [concat "$progname - " $filename]
|
||||||
set dirname [file dirname %D]
|
set dirname [file dirname $filename]
|
||||||
set basefilename [file tail [file rootname %D]]
|
set basefilename [file tail [file rootname $filename]]
|
||||||
}
|
}
|
||||||
if {$ismesh == 1} {
|
if {$ismesh == 1} {
|
||||||
AddRecentMeshFile %D;
|
AddRecentMeshFile $filename;
|
||||||
Ng_LoadMesh %D;
|
Ng_LoadMesh $filename;
|
||||||
set selectvisual mesh
|
set selectvisual mesh
|
||||||
Ng_SetVisParameters
|
Ng_SetVisParameters
|
||||||
redraw
|
redraw
|
||||||
|
Loading…
Reference in New Issue
Block a user