     @mylyn.filterOn = !@mylyn.filterOn
     if @mylyn.filterOn
       @mylyn.enabled = true
-    @reloadTreeView()
+      @reloadTreeView()
+    else
+      @view.treeViewOpenPromise
+                .then (view)=>
+                      selectedPath = view.selectedEntry()?.getPath()
+                      view.updateRoots()
 
 
 module.exports =

      @save()
      task

  reloadTreeView:()=>
      @view.treeViewOpenPromise
                .then (view)=>
                      selectedPath = view.selectedEntry()?.getPath()
                      view.updateRoots()
                      if selectedPath
                        view.selectEntryForPath selectedPath
                      @rebuild()

    span = $(e).find("span").first()
    path = $(span).attr("data-path")
    if !isAllowed(path)
        #$(e).remove()
        $(e).hide()
        #$(e).replaceWith($('<h5>' + e.innerHTML + '</h5>'));
        #$(e).addClass("mylyn-hidden")

        #$(e).addClass("status-ignored")
        #$(e).removeClass("entry")
    else
        $(e).show()
    #else

    #    $(e).removeClass("mylyn-hidden")
