Skip to content

Commit 3a6f3be

Browse files
committed
Hotfix to TodoExplorer causing a reparse during the startup which cause problems. This converts the RefreshCommand into a CommandBase, so it is property-injected rather than newed up directly.
1 parent 64e09bd commit 3a6f3be

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Rubberduck.Core/UI/ToDoItems/ToDoExplorerViewModel.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ public ToDoExplorerViewModel(
4949
_uiDispatcher = uiDispatcher;
5050
_state.StateChanged += HandleStateChanged;
5151

52+
RefreshCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(),
53+
_ =>
54+
{
55+
_state.OnParseRequested(this);
56+
},
57+
_ => _state.IsDirty());
5258
NavigateCommand = new NavigateCommand(selectionService);
5359
RemoveCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteRemoveCommand, CanExecuteRemoveCommand);
5460
CollapseAllCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteCollapseAll);
@@ -131,7 +137,7 @@ private void HandleStateChanged(object sender, EventArgs e)
131137

132138
public INavigateCommand NavigateCommand { get; }
133139

134-
public ReparseCommand RefreshCommand { get; set; }
140+
public CommandBase RefreshCommand { get; set; }
135141

136142
public CommandBase RemoveCommand { get; }
137143

0 commit comments

Comments
 (0)