Revision: 3556
Author: [email protected]
Date: Wed May 26 08:47:43 2010
Log: Set the UndoManager's loading flag while opening an old revision.
http://code.google.com/p/power-architect/source/detail?r=3556
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/ArchitectSwingSessionContextImpl.java
/trunk/src/main/java/ca/sqlpower/architect/swingui/enterprise/RevisionListPanel.java
/trunk/src/main/java/ca/sqlpower/architect/swingui/enterprise/ServerProjectsManagerPanel.java
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/ArchitectSwingSessionContextImpl.java
Tue May 25 14:03:00 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/ArchitectSwingSessionContextImpl.java
Wed May 26 08:47:43 2010
@@ -372,7 +372,7 @@
* the {...@link #sessions} field.
*
* @param projectName
- * The name of the project being opened in the new sesssion
+ * The name of the project being opened in the new session
* @param showGUI
* If true, then displays the GUI. If false, do not show
the GUI
* @param openingSession
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/enterprise/RevisionListPanel.java
Wed May 5 12:48:15 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/enterprise/RevisionListPanel.java
Wed May 26 08:47:43 2010
@@ -197,6 +197,7 @@
ArchitectSwingSession revisionSession = null;
try {
revisionSession =
swingSession.getContext().createSession(false);
+ revisionSession.getUndoManager().setLoading(true);
revisionSession.setName(location.getName() + " -
Revision " + revisionNo);
ArchitectSessionPersister sessionPersister = new
ArchitectSessionPersister(
@@ -209,6 +210,7 @@
SPJSONMessageDecoder decoder = new
SPJSONMessageDecoder(sessionPersister);
session.persistRevisionFromServer(revisionNo, decoder);
+ revisionSession.getUndoManager().setLoading(false);
revisionSession.initGUI(swingSession);
} catch (Exception ex) {
if (revisionSession != null) {
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/enterprise/ServerProjectsManagerPanel.java
Mon May 10 19:18:59 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/enterprise/ServerProjectsManagerPanel.java
Wed May 26 08:47:43 2010
@@ -100,13 +100,13 @@
if (getSelectedServerInfo() != null) {
- int [] indecies = projects.getSelectedIndices();
-
- if (indecies.length >= 1) {
-
- final Object [] objs = new Object[indecies.length];
- for (int i = 0; i < indecies.length; i++) {
- objs[i] =
projects.getModel().getElementAt(indecies[i]);
+ int [] indices = projects.getSelectedIndices();
+
+ if (indices.length >= 1) {
+
+ final Object [] objs = new Object[indices.length];
+ for (int i = 0; i < indices.length; i++) {
+ objs[i] =
projects.getModel().getElementAt(indices[i]);
}
for (Object obj : objs) {