Page 1 of 1
Possible bug : toolbar disappears !
Posted: Sat Oct 08, 2016 1:09 pm
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 ?
Re: Possible bug : toolbar disappears !
Posted: Mon Oct 10, 2016 1:19 pm
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
Re: Possible bug : toolbar disappears !
Posted: Wed Oct 12, 2016 1:18 pm
by vpapanik
Thanks a million, now works a treat !