Mainly code cleanup, added a lot of comments. Also making sure the element which was selected while being removed is re-selected again when undo is used. Not really happy with the solution as the the container should handle this somehow itself without work-around, for now it should be enough.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2311 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-11-25 08:48:10 +00:00
commit 46e9ea0e59
10 changed files with 246 additions and 60 deletions

View file

@ -43,7 +43,7 @@ namespace Greenshot.Memento {
}
}
public LangKey ActionKey {
public LangKey ActionLanguageKey {
get {
//return LangKey.editor_deleteelement;
return LangKey.none;
@ -60,6 +60,10 @@ namespace Greenshot.Memento {
AddElementMemento oldState = new AddElementMemento(surface, drawableContainer);
surface.AddElement(drawableContainer, false);
// The container has a selected flag which represents the state at the moment it was deleted.
if (drawableContainer.Selected) {
surface.SelectElement(drawableContainer);
}
// After
drawableContainer.Invalidate();