Possible bug : toolbar disappears !

Moderator: GiD Team

Post Reply
User avatar
vpapanik
Posts: 49
Joined: Sat Oct 08, 2016 1:05 pm

Possible bug : toolbar disappears !

Post by vpapanik »

In v13 (stable/developer) there's a problem when you return from postprocessing back to preprocessing. If there's a problemtype toolbar there, it just disappears and you have to re-enable it manually from 'configure toolbars'. Any ideas ?
User avatar
escolano
Posts: 1922
Joined: Sun Sep 05, 1982 10:51 pm

Re: Possible bug : toolbar disappears !

Post by escolano »

Which problemtype is adding this toolbar?
It depends on how is implemented in the Tcl code of the problemtype.

Several problemtypes have been copied of previous examples, and they have exactly this (usually the copied the code and have the same name of procedures and names of variables!!)

proc MyBitmaps { dir { type "DEFAULT INSIDELEFT"} } {
...
CreateOtherBitmaps MyBar "My toolbar" MyBitmapsNames MyBitmapsCommands MyBitmapsHelp $dir "MyBitmaps [list $dir]" $type $prefix]
AddNewToolbar "Caltep2000 bar" ${prefix}MyBarWindowGeom "MyBitmaps [list $dir]"
}

the problem with GiD 13.x is avoided removing the first parameter 'dir'.

proc MyBitmaps { { type "DEFAULT INSIDELEFT"} } {
...
CreateOtherBitmaps MyBar "My toolbar" MyBitmapsNames MyBitmapsCommands MyBitmapsHelp $dir MyBitmaps $type $prefix]
AddNewToolbar "Caltep2000 bar" ${prefix}MyBarWindowGeom MyBitmaps
}

note that all inkocations to this proc MyBitmaps are done without the first 'dir' argument.
probably the dir variable was necessary inside the MyBitmaps procedure, it is possible to store it in a global variable (e.g. in InitGidProject that provide the value of the full path to the problemtype just loaded) and use this global variable instead of pass to MyBitmaps as argument
User avatar
vpapanik
Posts: 49
Joined: Sat Oct 08, 2016 1:05 pm

Re: Possible bug : toolbar disappears !

Post by vpapanik »

Thanks a million, now works a treat !
Post Reply