Move delayed request to update a spotlight to more appropriate place

This commit is contained in:
Sergey Malenkov
2015-02-05 20:31:20 +03:00
parent 346785844b
commit 7e304b60ad
@@ -248,21 +248,7 @@ final class SettingsEditor extends AbstractEditor implements DataProvider {
}
}
myFilter.update(filter, false, true);
myTreeView.select(configurable).doWhenProcessed(new Runnable() {
@Override
public void run() {
if (!myDisposed) {
new Alarm().addRequest(new Runnable() {
@Override
public void run() {
if (!myDisposed) {
mySpotlightPainter.updateNow();
}
}
}, 300);
}
}
});
myTreeView.select(configurable);
Disposer.register(this, myTreeView);
}
@@ -330,6 +316,16 @@ final class SettingsEditor extends AbstractEditor implements DataProvider {
myEditor.getResetAction().setEnabled(myFilter.myContext.isModified(configurable) || exception != null);
myEditor.setError(exception);
}
if (configurable != null) {
new Alarm().addRequest(new Runnable() {
@Override
public void run() {
if (!myDisposed && mySpotlightPainter != null) {
mySpotlightPainter.updateNow();
}
}
}, 300);
}
}
void checkModified(Configurable configurable) {