diff options
author | Xavier Ducrohet <xav@android.com> | 2011-01-11 17:16:56 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2011-01-11 17:18:31 -0800 |
commit | 880899162070e7e3eed85fc0b8f68eede1776f2c (patch) | |
tree | 1fa5b9255b6ba0462a43de76af85be0f232652b2 | |
parent | 1d10da44463c2d9a8c342246945a98ff339898fc (diff) | |
download | sdk-880899162070e7e3eed85fc0b8f68eede1776f2c.zip sdk-880899162070e7e3eed85fc0b8f68eede1776f2c.tar.gz sdk-880899162070e7e3eed85fc0b8f68eede1776f2c.tar.bz2 |
Don't reopen a layout if it's already opened.
This is for the case where a layout is opened
and Eclipse tell its editor to re-open it because it was
double clicked again in the package explorer due to the
MatchingStrategy having returned true.
Change-Id: I404494b990215bcdff163a382ecb411e2efb9b51
Misc: reorder configs for the WXGA device config.
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java | 4 | ||||
-rw-r--r-- | files/devices.xml | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java index 17d6ddf..70e062a 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java @@ -250,6 +250,10 @@ public class LayoutEditor extends AndroidXmlEditor implements IShowEditorInput, * opening a different configuration of the same layout. */ public void showEditorInput(IEditorInput editorInput) { + if (getEditorInput().equals(editorInput)) { + return; + } + // save the current editor input. doSave(new NullProgressMonitor()); diff --git a/files/devices.xml b/files/devices.xml index 3176855..09171c9 100644 --- a/files/devices.xml +++ b/files/devices.xml @@ -307,11 +307,11 @@ <d:ydpi>149</d:ydpi> </d:default> - <d:config name="Portrait"> - <d:screen-orientation>port</d:screen-orientation> - </d:config> <d:config name="Landscape"> <d:screen-orientation>land</d:screen-orientation> </d:config> + <d:config name="Portrait"> + <d:screen-orientation>port</d:screen-orientation> + </d:config> </d:device> </d:layout-devices> |