mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] fix recreating log after reloading mappings from disk
When vcs mappings are changed on disk, ProjectLevelVcsManager.readDirectoryMappings first clears the old mappings completely. This triggers VCS_CONFIGURATION_CHANGED event. Then new mappings are set, which triggers the event again. So recreateLog is called twice, the first time it just disposes the old log, the second it should create a new one. The issue was that the callback creating a new log was only called if an old log was present (after disposing it). Which led to new log not being created. Fix is to always invoke the callback.
This commit is contained in:
@@ -180,8 +180,11 @@ public class VcsProjectLog implements Disposable {
|
||||
if (myValue != null) {
|
||||
myMessageBus.syncPublisher(VCS_PROJECT_LOG_CHANGED).logDisposed(myValue);
|
||||
myValue.dispose(callback);
|
||||
myValue = null;
|
||||
}
|
||||
else if (callback != null) {
|
||||
ApplicationManager.getApplication().executeOnPooledThread(callback);
|
||||
}
|
||||
myValue = null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user