Author: scabanovich
Date: 2008-10-15 10:21:11 -0400 (Wed, 15 Oct 2008)
New Revision: 10856
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
Log:
Selection improved
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2008-10-15
14:13:26 UTC (rev 10855)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2008-10-15
14:21:11 UTC (rev 10856)
@@ -831,6 +831,7 @@
protected void pageChange(int newPageIndex) {
deactivateSite(false, false);
+ boolean isText = selectedPageIndex == getSourcePageIndex();
selectedPageIndex = newPageIndex;
Control control = getControl(newPageIndex);
if (control != null) {
@@ -848,7 +849,7 @@
if(postponedTextSelection.selected != null) {
Display.getDefault().asyncExec(postponedTextSelection);
}
- if(newPageIndex != getSourcePageIndex()) {
+ if(isText && newPageIndex != getSourcePageIndex()) {
synchronizeSelectionWithText();
}
activateSite();