aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/LayoutEditor.java4
-rw-r--r--files/devices.xml6
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>