Thanks
Damjan Šavko
On 8/9/06, Jesse Eichar <[EMAIL PROTECTED]> wrote:
HIInteresting. That should still work. I usually do the disabling slightly differently:rect =3D new Rectangle( e.x - 10, e.y -10, 10, 10);dsc =3D context.getDrawFactory().createDrawShapeCommand(rect,java.awt.Color.GREEN, 1, 1);dsc.setShape(rect);dsc.setValid (true);context.sendASyncCommand(dsc);anddsc.setValid(false);context.getViewportPane().repaint();I really can't see any reason this doesn't work since it is used by the zoom and all the edit tools.JesseOn 9-Aug-06, at 1:45 AM, Damjan Šavko wrote:------=_Part_22162_21138779.1155113144237Content-Type: text/plain; charset=WINDOWS-1252; format=flowedContent-Transfer-Encoding: quoted-printableContent-Disposition: inlineOK Jesse. Would you happen to know if the problem with using theDrawShapeCommand-s in RC2 is also a bug or did something change from M7 toRC2?From last mail:Also I've noticed that my drawing tools are acting very strange. To draw onthe map I use the folowing commands:rect =3D new Rectangle(e.x - 10, e.y -10, 10, 10);dsc =3D context.getDrawFactory().createDrawShapeCommand(rect,java.awt.Color.GREEN, 1, 1);dsc.setShape(rect);dsc.setValid (true);context.sendASyncCommand(dsc);anddsc.setValid(false);context.sendASyncCommand(dsc);to erase.Do you know what were the changes from uDigM7 to uDigRC2 that caused myplugins to stop working?Damjan =8AavkoOn 8/8/06, Jesse Eichar < [EMAIL PROTECTED]> wrote:HiI'm just created a new Issue: UDIG 958. You can add yourself as awatcher so that you will be notified when it is closed. I will try to cl=osethe issue very soon.JesseOn 8-Aug-06, at 3:54 AM, Damjan =8Aavko wrote:OK, I've done some more testing and I think there is a bug in uDig-RC2.After you select a modal tool, you cannot deselect it. It keeps on beingselected. The only way to deselect it is to choose another modal tool.Hope it helps.
Damjan =8AavkoOn 8/8/06, Damjan =8Aavko <[EMAIL PROTECTED]> wrote:Hi, I' ve started moving my plugins to uDig-RC2 (SDK) from uDig-M7(SDK)and I've been having some troubles. The trick you showed me to deactiva=te atool in the toolbar: ApplicationGIS.getToolManager ().getTool (toolID,categoryID).run(); doesn't do the trick anymore. Instead ofturning the button off it turns it on (although is already on) throwing=thetool in an endless loop.Also I've noticed that my drawing tools are acting very strange. To dra=won the map I use the folowing commands:rect =3D new Rectangle(e.x - 10, e.y -10, 10, 10);dsc =3D context.getDrawFactory().createDrawShapeCommand(rec=t,java.awt.Color.GREEN, 1, 1);dsc.setShape(rect);dsc.setValid (true);context.sendASyncCommand(dsc);anddsc.setValid(false);context.sendASyncCommand(dsc);to erase.Do you know what were the changes from uDigM7 to uDigRC2 that caused myplugins to stop working?Thanks.Damjan =8AavkoOn 7/21/06, Jesse Eichar < [EMAIL PROTECTED] > wrote:The reason it works is because when you press the button the runmethods is executed. So basically you need to simulate a button pres=s...which calling run does.JesseOn 21-Jul-06, at 2:10 AM, Damjan =8Aavko wrote:Bingo Jesse! That really did the trick. I would have never thought touse the run() method inside a modal tool. I still don't know why that=worksbut I don't really care that much :)Another thing: I can get the category ID byApplicationGIS.getToolManager().getActiveCategory().getId() but Icannot do the same with tool ID. There is noApplicationGIS.getToolManager().getActiveTool().getId().Anyway that's not such a big problem, it would've been just a bit mor=eelegant.Thanks a lot!DamjanOn 7/20/06, Jesse Eichar <[EMAIL PROTECTED]> wrote:HiThe 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=
_______________________________________________
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
