|
Re: Questions on undo/redo support?: msg#00524gis.jump.devel
Hi SS, The undo/redo support is really a java thing that you can support in your tool, but doesn't really make sense for the toolbar undo and redo buttons. Those buttons are expected to undo and redo edits, not selections. It also doesn't normally undo layer operations. For instance you can't undo creating a new layer or removing one. These kind of operations are easily reversed manually, and implementing them can lead to code that balloons into a huge subsystem that most users don't want anyway. (Would anyone really want to undo saving a file?) So, in the example you gave: [1] Copy selected features to the destination layer. [2] Clear the current selection. [3] Delete the copied features from the source layer. I would say that undo should remove the copied features from the destination layer, restore them to the source layer, but not attempt to restore the selection or remove the destination layer. It should probably do this in one click of the undo. There are other plugins that do this same sort of thing, but I can't find one offhand that implements undo. If you are concerned about losing the selection, what I have done in the past is to implement a Save/Restore selection button. I guess this would be based on FID in OJ. Your concern about memory usage is a valid concern. It seems like you should be able to simply move the features from one layer to the other without deleting and creating, but they probably have different schemas, so that won't work. You can do it for the geometry, of course, but I'm not sure of the consequences of that. I still remember the first time I tried to do a copy from one layer to another in code. I ended up with two features sharing the same geometry. A potentially useful, but scary concept. regards, Larry On 9/27/07, Sunburned Surveyor <sunburned.surveyor@xxxxxxxxx> wrote:
I've been looking at the steps necessary to add undo/redo support to -- http://amusingprogrammer.blogspot.com/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: @Stefan - Complete Italian Language files: 00524, Giuseppe Aruta |
|---|---|
| Next by Date: | Re: Questions on undo/redo support?: 00524, Stefan Steiniger |
| Previous by Thread: | Questions on undo/redo support?i: 00524, Sunburned Surveyor |
| Next by Thread: | Re: Questions on undo/redo support?: 00524, Stefan Steiniger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |