cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r691245 - in /cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler: dialog/FindDialog.java editor/ObjEntityTabbedView.java editor/dbentity/DbEntityTabbedView.java
Date Tue, 02 Sep 2008 13:41:37 GMT
Author: aadamchik
Date: Tue Sep  2 06:41:33 2008
New Revision: 691245

URL: http://svn.apache.org/viewvc?rev=691245&view=rev
Log:
CAY-1060  CM: Allow multiple item selections (last patch to fix some unintended breakage)

Modified:
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FindDialog.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTabbedView.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityTabbedView.java

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FindDialog.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FindDialog.java?rev=691245&r1=691244&r2=691245&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FindDialog.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/FindDialog.java
Tue Sep  2 06:41:33 2008
@@ -131,7 +131,7 @@
             if(path[path.length - 1] instanceof Entity) {
 
                 /** Make selection in a project tree, open correspondent entity tab */
-                editor.getProjectTreeView().getSelectionModel().addSelectionPath(buildTreePath(path));
+                editor.getProjectTreeView().getSelectionModel().setSelectionPath(buildTreePath(path));
                 EntityDisplayEvent event = new EntityDisplayEvent(
                         editor.getProjectTreeView(),
                         (Entity) path[path.length - 1],
@@ -151,7 +151,7 @@
                 Object[] o = new Object[path.length - 1];
                 for(int i = 0; i < path.length - 1; i++)
                     o[i] = path[i];
-                editor.getProjectTreeView().getSelectionModel().addSelectionPath(buildTreePath(o));
+                editor.getProjectTreeView().getSelectionModel().setSelectionPath(buildTreePath(o));
 
 
                 if (path[path.length - 1] instanceof DbAttribute) {

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTabbedView.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTabbedView.java?rev=691245&r1=691244&r2=691245&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTabbedView.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTabbedView.java
Tue Sep  2 06:41:33 2008
@@ -151,7 +151,7 @@
         
         System.arraycopy(rels, 0, objRels, 0, rels.length);
         
-        if (getSelectedComponent() != relationshipsPanel) {
+        if (getSelectedComponent() != relationshipsPanel && objRels.length > 0)
{
             setSelectedComponent(relationshipsPanel);
             relationshipsPanel.setVisible(true);
         }
@@ -169,7 +169,7 @@
         
         System.arraycopy(attrs, 0, objAttrs, 0, attrs.length);
         
-        if (getSelectedComponent() != attributesPanel) {
+        if (getSelectedComponent() != attributesPanel && objAttrs.length > 0)
{
             setSelectedComponent(attributesPanel);
             attributesPanel.setVisible(true);
         }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityTabbedView.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityTabbedView.java?rev=691245&r1=691244&r2=691245&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityTabbedView.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/dbentity/DbEntityTabbedView.java
Tue Sep  2 06:41:33 2008
@@ -124,7 +124,7 @@
         System.arraycopy(rels, 0, dbRels, 0, rels.length);
         
         // reset tab to relationship
-        if (getSelectedComponent() != relationshipsPanel) {
+        if (getSelectedComponent() != relationshipsPanel && dbRels.length > 0)
{
             setSelectedComponent(relationshipsPanel);
             relationshipsPanel.setVisible(true);
         }
@@ -142,7 +142,7 @@
         
         System.arraycopy(attrs, 0, dbAttrs, 0, attrs.length);
         
-        if (getSelectedComponent() != attributesPanel) {
+        if (getSelectedComponent() != attributesPanel && dbAttrs.length > 0) {
             setSelectedComponent(attributesPanel);
             attributesPanel.setVisible(true);
         }



Mime
View raw message