Author: mvw
Date: 2008-09-22 12:04:46-0700
New Revision: 15770
Modified:
trunk/src/argouml-app/src/org/argouml/ui/DetailsPane.java
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java
Log:
Issue 5402: Tab selection in the details pane is annoying.
This patch considerably improves the situation, without introducing too much risk, but is not a complete solution.
Modified: trunk/src/argouml-app/src/org/argouml/ui/DetailsPane.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/DetailsPane.java?view=diff&rev=15770&p1=trunk/src/argouml-app/src/org/argouml/ui/DetailsPane.java&p2=trunk/src/argouml-app/src/org/argouml/ui/DetailsPane.java&r1=15769&r2=15770
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/DetailsPane.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/DetailsPane.java 2008-09-22 12:04:46-0700
@@ -258,7 +258,7 @@
// Always select properties panel if defaultToProperties is true,
// and if properties panel is appropriate for selected perspective
- if (defaultToProperties) {
+ if (defaultToProperties || lastNonNullTab < 0) {
tabSelected = selectPropsTab(target);
} else {
// Select prop panel if current panel is not appropriate
@@ -607,7 +607,7 @@
* @see TargetListener#targetSet(TargetEvent)
*/
public void targetSet(TargetEvent e) {
- setTarget(e.getNewTarget(), true);
+ setTarget(e.getNewTarget(), false);
fireTargetSet(e);
}
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java?view=diff&rev=15770&p1=trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java&p2=trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java&r1=15769&r2=15770
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java 2008-09-22 12:04:46-0700
@@ -1,5 +1,5 @@
// $Id$
-// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
@@ -284,7 +284,8 @@
}
}
if (addedTargets.size() == 1
- && removedTargets.size() == currentSelection.size()) {
+ && removedTargets.size() == currentSelection.size()
+ && removedTargets.size() != 0) {
// Optimize for the normal case to minimize target changes
TargetManager.getInstance().setTarget(addedTargets.get(0));
} else {
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.