aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-06-02 13:55:09 -0700
committerTor Norbye <tnorbye@google.com>2011-06-02 13:55:09 -0700
commitae2d2716061bb86dc9a3fb950aa2e56bad25d83e (patch)
tree78241fea6349c9e00865f8b29740f8ab0ce21091 /eclipse
parentd0758b24b77a7fa65143e21a3f873020f8809d0a (diff)
downloadsdk-ae2d2716061bb86dc9a3fb950aa2e56bad25d83e.zip
sdk-ae2d2716061bb86dc9a3fb950aa2e56bad25d83e.tar.gz
sdk-ae2d2716061bb86dc9a3fb950aa2e56bad25d83e.tar.bz2
Fix bug in project-wide render target selection
I ran into a scenario where selecting a render target caused the new target to be loaded, but then the selection jumped back to the previous value. The reason for this is that there is a codepath from the dropdown callback which ends up calling "syncRenderState" before the old value has been saved, so syncRenderState will read the previous value and sync it back to the dropdown. The fix is easy -- make sure we save the render state before notifying clients of the change. Change-Id: I28d8d8ec1e9c23311892ca05ab4348ae5aed90ae
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationComposite.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationComposite.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationComposite.java
index 0124111..4c6bac8 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationComposite.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationComposite.java
@@ -2178,12 +2178,12 @@ public class ConfigurationComposite extends Composite {
mListener.onRenderingTargetPostChange(mRenderingTarget);
}
+ // Store project-wide render-target setting
+ saveRenderState();
+
if (computeOk && mListener != null) {
mListener.onConfigurationChange();
}
-
- // Store project-wide render-target setting
- saveRenderState();
}
/**