Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 101104 Details for
Bug 232909
UndoLimit in CommandStack works not as described
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch that fixes the described problem for me, please review.
org.eclipse.gef_232909.txt (text/plain), 1.12 KB, created by
Marco Lehmann-Mörz
on 2008-05-20 13:24:31 EDT
(
hide
)
Description:
Patch that fixes the described problem for me, please review.
Filename:
MIME Type:
Creator:
Marco Lehmann-Mörz
Created:
2008-05-20 13:24:31 EDT
Size:
1.12 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gef >Index: src/org/eclipse/gef/commands/CommandStack.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.gef/src/org/eclipse/gef/commands/CommandStack.java,v >retrieving revision 1.17 >diff -u -r1.17 CommandStack.java >--- src/org/eclipse/gef/commands/CommandStack.java 16 Mar 2006 14:44:06 -0000 1.17 >+++ src/org/eclipse/gef/commands/CommandStack.java 20 May 2008 16:03:25 -0000 >@@ -147,8 +147,9 @@ > notifyListeners(command, PRE_EXECUTE); > try { > command.execute(); >- if (getUndoLimit() > 0) { >- while (undoable.size() >= getUndoLimit()) { >+ undoable.push(command); >+ if (getUndoLimit() > -1) { >+ while (undoable.size() > getUndoLimit()) { > ((Command)undoable.remove(0)).dispose(); > if (saveLocation > -1) > saveLocation--; >@@ -156,7 +157,6 @@ > } > if (saveLocation > undoable.size()) > saveLocation = -1; //The save point was somewhere in the redo stack >- undoable.push(command); > notifyListeners(); > } finally { > notifyListeners(command, POST_EXECUTE);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 232909
: 101104