[vcs-log] apply filters immediately appcode/171.739 appcode/171.748 clion/171.740 clion/171.747 dbe/171.743 phpstorm/171.738 phpstorm/171.746 pycharm/171.736 pycharm/171.741 rubymine/171.742 webstorm/171.745
authorJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Fri, 4 Nov 2016 20:32:03 +0000 (23:32 +0300)
committerJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Fri, 4 Nov 2016 20:32:19 +0000 (23:32 +0300)
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/VcsLogUiImpl.java
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/filter/VcsLogClassicFilterUi.java

index b37585d6936cfa1bdcbb996e0f69cbc31359a4ea..8a036e5e859bd78c7467507425a2331cb985b01d 100644 (file)
@@ -255,8 +255,7 @@ public class VcsLogUiImpl implements VcsLogUi, Disposable {
     return myColorManager;
   }
 
-  public void applyFiltersAndUpdateUi() {
-    VcsLogFilterCollection filters = myMainFrame.getFilterUi().getFilters();
+  public void applyFiltersAndUpdateUi(@NotNull VcsLogFilterCollection filters) {
     myFilterer.onFiltersChange(filters);
   }
 
index 6ec9a058aab5c1bf94c8f7c304c2ae2b60c52097..cc55c0c37029670d38eebc3a039386b6f63ec7a1 100644 (file)
@@ -88,14 +88,14 @@ public class VcsLogClassicFilterUi implements VcsLogFilterUi {
     myTextFilterModel = new TextFilterModel(dataPackGetter, myUiProperties);
 
     updateUiOnFilterChange();
-    ApplicationManager.getApplication().invokeLater(myUi::applyFiltersAndUpdateUi);
+    myUi.applyFiltersAndUpdateUi(getFilters());
   }
 
   private void updateUiOnFilterChange() {
     FilterModel[] models = {myBranchFilterModel, myUserFilterModel, myDateFilterModel, myStructureFilterModel, myTextFilterModel};
     for (FilterModel<?> model : models) {
       model.addSetFilterListener(() -> {
-        myUi.applyFiltersAndUpdateUi();
+        myUi.applyFiltersAndUpdateUi(getFilters());
         myBranchFilterModel
           .onStructureFilterChanged(new HashSet<>(myLogData.getRoots()), myStructureFilterModel.getFilter());
       });