File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed
Rubberduck.Core/UI/ToDoItems Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,31 @@ public ToDoExplorerViewModel(
52
52
RefreshCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) ,
53
53
_ =>
54
54
{
55
- _state . OnParseRequested ( this ) ;
55
+ switch ( _state . Status )
56
+ {
57
+ case ParserState . Ready :
58
+ case ParserState . Error :
59
+ case ParserState . ResolverError :
60
+ case ParserState . UnexpectedError :
61
+ case ParserState . Pending :
62
+ _state . OnParseRequested ( this ) ;
63
+ break ;
64
+ }
56
65
} ,
57
- _ => _state . IsDirty ( ) ) ;
66
+ _ =>
67
+ {
68
+ switch ( _state . Status )
69
+ {
70
+ case ParserState . Ready :
71
+ case ParserState . Error :
72
+ case ParserState . ResolverError :
73
+ case ParserState . UnexpectedError :
74
+ case ParserState . Pending :
75
+ return true ;
76
+ default :
77
+ return false ;
78
+ }
79
+ } ) ;
58
80
NavigateCommand = new NavigateCommand ( selectionService ) ;
59
81
RemoveCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteRemoveCommand , CanExecuteRemoveCommand ) ;
60
82
CollapseAllCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteCollapseAll ) ;
You can’t perform that action at this time.
0 commit comments