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 @@ -53,9 +53,31 @@ public ToDoExplorerViewModel(
53
53
RefreshCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) ,
54
54
_ =>
55
55
{
56
- _state . OnParseRequested ( this ) ;
56
+ switch ( _state . Status )
57
+ {
58
+ case ParserState . Ready :
59
+ case ParserState . Error :
60
+ case ParserState . ResolverError :
61
+ case ParserState . UnexpectedError :
62
+ case ParserState . Pending :
63
+ _state . OnParseRequested ( this ) ;
64
+ break ;
65
+ }
57
66
} ,
58
- _ => _state . IsDirty ( ) ) ;
67
+ _ =>
68
+ {
69
+ switch ( _state . Status )
70
+ {
71
+ case ParserState . Ready :
72
+ case ParserState . Error :
73
+ case ParserState . ResolverError :
74
+ case ParserState . UnexpectedError :
75
+ case ParserState . Pending :
76
+ return true ;
77
+ default :
78
+ return false ;
79
+ }
80
+ } ) ;
59
81
NavigateCommand = new NavigateCommand ( selectionService ) ;
60
82
RemoveCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteRemoveCommand , CanExecuteRemoveCommand ) ;
61
83
CollapseAllCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteCollapseAll ) ;
You can’t perform that action at this time.
0 commit comments