Bug 3809 - Simulator does not properly simulate setDisplay* methods
authorEugene Ostroukhov <eugeneo@symbian.org>
Mon, 11 Oct 2010 14:10:17 -0700
changeset 491 27c0e5ff3255
parent 490 17d65127bce4
child 492 aa160993160c
Bug 3809 - Simulator does not properly simulate setDisplay* methods
plugins/org.symbian.tools.tmw.previewer/preview/script/emulator.js
plugins/org.symbian.tools.tmw.previewer/preview/script/lib/widget.js
--- a/plugins/org.symbian.tools.tmw.previewer/preview/script/emulator.js	Mon Sep 27 11:43:44 2010 -0700
+++ b/plugins/org.symbian.tools.tmw.previewer/preview/script/emulator.js	Mon Oct 11 14:10:17 2010 -0700
@@ -229,9 +229,9 @@
 	$("#DeviceDisplayLayout").css("-webkit-transform", val);
 };
 
-Emulator.prototype.setMode = function(mode) {
+Emulator.prototype.setMode = function(mode, fixed) {
 	NOKIA.mode = mode;
-
+	NOKIA.emulator.modeForced = fixed ? true : false; // Note - fixed may be undefined
 	// SAVE the device DATA
 	NOKIA.helper.setPreference('__SYM_NOKIA_EMULATOR_DEVICE_MODE', NOKIA.mode);
 
--- a/plugins/org.symbian.tools.tmw.previewer/preview/script/lib/widget.js	Mon Sep 27 11:43:44 2010 -0700
+++ b/plugins/org.symbian.tools.tmw.previewer/preview/script/lib/widget.js	Mon Oct 11 14:10:17 2010 -0700
@@ -177,7 +177,7 @@
 	widget.setDisplayLandscape = function(){
 		try {
 			if (this.isrotationsupported && _BRIDGE_REF.nokia.emulator.orientationSupports()) {
-				_BRIDGE_REF.nokia.emulator.setMode('landscape');
+				_BRIDGE_REF.nokia.emulator.setMode('landscape', true);
 			}
 		} 
 		catch (e) {
@@ -198,7 +198,7 @@
 	widget.setDisplayPortrait = function(){
 		try {
 			if (this.isrotationsupported && _BRIDGE_REF.nokia.emulator.orientationSupports()) {
-				_BRIDGE_REF.nokia.emulator.setMode('portrait');
+				_BRIDGE_REF.nokia.emulator.setMode('portrait', true);
 			}
 		} 
 		catch (e) {