Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo Command can not works correct At commit e566f91240b576a7b058d77c74424f0731f20b93 #140

Open
ningfc opened this issue Nov 18, 2021 · 1 comment

Comments

@ningfc
Copy link

ningfc commented Nov 18, 2021

I try to edit shape geometry and then click Undo button, but the edited shape not recover.
This happend at commit e566f91 MW5CORE-224 and later commits, And I test at commit 532e709 MW5Core-222, it works OK.

@ningfc
Copy link
Author

ningfc commented Nov 18, 2021

I debug and try, And then I realized something wrong. The Undo command not work, because UndoList.Add function call must before the function FeatureSet.EditDelete(i).
Like this.
`

    list.Add(UndoOperation.RemoveShape, layerHandle, i);
    features.EditDelete(i);

`

Don't like this.
`

    features.EditDelete(i);
    list.Add(UndoOperation.RemoveShape, layerHandle, i);

`
If you delete the shape first, and then add it to UndoList, but the shape index already delete, UndoList.Add will do nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant