From 4867ce096c648149c49089fb7230adc499ebd39a Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Thu, 2 Jun 2011 11:33:51 -0700 Subject: Fix invalid caching of project callback Change-Id: If7c0ee87e5263767e607cf226838e65667a5106c --- .../adt/internal/editors/layout/gle2/GraphicalEditorPart.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java index 88624bc..41017a0 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java @@ -1425,11 +1425,10 @@ public class GraphicalEditorPart extends EditorPart } } - // also remove the ProjectCallback as it caches custom views which must be reloaded - // with the classloader of the new LayoutLib. - if (mProjectCallback != null && mProjectCallback.isUsed()) { - mProjectCallback = null; - } + // Also remove the ProjectCallback as it caches custom views which must be reloaded + // with the classloader of the new LayoutLib. We also have to clear it out + // because it stores a reference to the layout library which could have changed. + mProjectCallback = null; // FIXME: get rid of the current LayoutScene if any. } -- cgit v1.1