Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] fun with DoubleClickRunAccept

Hi Mauricio:

I am about to commit a change to the split tool on the 1.2.x branch that lets it drill holes in existing features, as such I have been reviewing your existing code.

This email is some notes as I work (or at least beat answers out of Jesse):
- The SplitFeaturesCommand did an interesting dance where it used an internal runnable to build up a list of undoable commands; this code forced itself into the display thread to set the wait cursor to busy.

Turns out that this functionality you added was do to a bug in the DoubleClickAndRunAcceptBehaviour which jesse has now fixed. I have patched your DoubleClickRunAcceptWithProviderBehaviour as well ...

SplitGeometryBehavior now takes care of things by creating an undoable composite command with a couple of SetEditStateCommands around the SplitFeatureCommand.
        UndoableComposite commands = new UndoableComposite();
        commands.add( new SetEditStateCommand(handler, EditState.BUSY ));
commands.add( commandFactory.createSplitFeaturesCommand(handler) );
        commands.add( new SetEditStateCommand(handler, EditState.NONE ));
I am still getting my head around this stuff; so if you and Jesse can keep me on the straight and narrow it would be good.

Jody


Back to the top