Hi
The following snippet can be added to you setActiveMethod():
Display.getCurrent().asyncExec(new Runnable(){
public void run(){
ApplicationGIS.getToolManager().getTool(toolID).run();
}
}
I haven't actually tested this situation so let me know how it goes.
But theoretically it should work... :) If it doesn't file a bug
report and I will fix the issue.
Jesse
On 20-Jul-06, at 1:52 AM, Damjan Šavko wrote:
Hello, I'm making a modal tool to select certain features on the
map. But certain types of data must be in the current map to use
this tool. So I check if the conditions are valid using the
function setActive(active) (which is run where the button is
pressed) and that works fine. But if the conditions aren't true I
would like to deactivate the button programatically so that the
user wouldn't have to deactivate the button manually. Is there a
way I could do that?
Thanks for your help.
Damjan
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel