[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [udig-devel] How to programmatically create features with 'auto	commit'? | 
Hi
there is a setting in ProjectPlugin setUndoableCommandWarning.  Set it  
to false and you can run commands that can't be undone without the  
warning dialog.  Just remember to set it back to true.
Jesse
On 22-Oct-08, at 1:35 PM, Matthias Lendholt wrote:
Dear list,
modifying programmatically the layer opens the attached pop-up  
dialog. Since the modification is done programmatically the user  
shouldn't bothered with such a dialog. How can I set uDig to "auto  
commit"?
Code:
FeatureStore fs = layer.getGeoResource().resolve(FeatureStore.class,  
null);
fs.addFeatures(DataUtilities.collection(features.toArray(new  
Feature[features.size()])));
MapCommand cmd =  
EditCommandFactory.getInstance().createCommitCommand();
map.sendCommandSync(cmd);
The command leads to this pop-up dialog and without command the  
featurestore isn't updated. This is independent from layer.refresh().
Thank you,
Matthias
<commitrequest.PNG>_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel