on lookup reuse, the ads should be cleared

This commit is contained in:
peter
2011-03-07 18:24:49 +01:00
parent a2235cb13e
commit 57ebab5f58
2 changed files with 5 additions and 1 deletions
@@ -82,6 +82,10 @@ public class Advertiser implements Disposable {
return new ArrayList<String>(myTexts);
}
public synchronized void clearAdvertisements() {
myTexts.clear();
}
private static Font adFont() {
Font font = UIUtil.getLabelFont();
return font.deriveFont((float)(font.getSize() - 2));
@@ -1161,7 +1161,7 @@ public class LookupImpl extends LightweightHint implements Lookup, Disposable {
public void markReused() {
myReused = true;
myModel.clearItems();
setAdvertisementText(null);
myAdComponent.clearAdvertisements();
myPreselectedItem = null;
}