check for dumbness in image preview

This commit is contained in:
Peter Gromov
2009-08-21 19:19:45 +04:00
parent 6a4135698f
commit d0cd53e6d6

View File

@@ -2,6 +2,7 @@ package com.intellij.html.preview;
import com.intellij.codeInsight.hint.HintManagerImpl;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.project.DumbService;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
@@ -195,6 +196,10 @@ public class ImageOrColorPreviewManager implements Disposable, EditorMouseMotion
return;
}
if (DumbService.getInstance(element.getProject()).isDumb()) {
return;
}
final LightweightHint hint = ImageOrColorPreviewManager.getHint(element);
if (hint != null) {
final Editor editor = myManager.getEditor();