cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject cayenne git commit: Modeler: Fix JTextFiled undo support for Java 9 & 10
Date Mon, 26 Mar 2018 11:30:40 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 23732634d -> 23c3a8c5d


Modeler: Fix JTextFiled undo support for Java 9 & 10


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/23c3a8c5
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/23c3a8c5
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/23c3a8c5

Branch: refs/heads/master
Commit: 23c3a8c5d053a7c43859424ea34a9194f725b10d
Parents: 2373263
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Mon Mar 26 14:30:33 2018 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Mon Mar 26 14:30:33 2018 +0300

----------------------------------------------------------------------
 .../apache/cayenne/modeler/undo/JTextFieldUndoListener.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/23c3a8c5/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/JTextFieldUndoListener.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/JTextFieldUndoListener.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/JTextFieldUndoListener.java
index b830493..ced35ce 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/JTextFieldUndoListener.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/JTextFieldUndoListener.java
@@ -78,10 +78,8 @@ public class JTextFieldUndoListener implements UndoableEditListener {
             return;
         }
 
-        AbstractDocument.DefaultDocumentEvent event = (AbstractDocument.DefaultDocumentEvent)
e
-                .getEdit();
-
-        if (event.getType().equals(DocumentEvent.EventType.CHANGE)) {
+        // See AbstractDocument.DefaultDocumentEvent.getPresentationName() method
+        if("AbstractDocument.styleChangeText".equals(e.getEdit().getPresentationName()))
{
             compoundEdit.addEdit(e.getEdit());
             return;
         }


Mime
View raw message