IDEA-84264 IdeTalk plugin: multiple messages are logged endlessly

This commit is contained in:
Dmitry Avdeev
2012-04-09 19:17:28 +04:00
parent 9a483e8f85
commit d31c3a3882
@@ -349,10 +349,10 @@ public final class ToolWindowImpl implements ToolWindowEx {
public final void setIcon(final Icon icon) {
ApplicationManager.getApplication().assertIsDispatchThread();
if (!(icon instanceof LayeredIcon) && (icon.getIconHeight() != 13 || icon.getIconWidth() != 13)) {
final Icon oldIcon = getIcon();
if (oldIcon != icon && !(icon instanceof LayeredIcon) && (icon.getIconHeight() != 13 || icon.getIconWidth() != 13)) {
LOG.warn("ToolWindow icons should be 13x13. Please fix " + icon);
}
final Icon oldIcon = getIcon();
getSelectedContent().setIcon(icon);
myIcon = icon;
myChangeSupport.firePropertyChange(PROP_ICON, oldIcon, icon);