Skip to content

Commit 90e5d0c

Browse files
Only change sorting options if the MenuItem is not already selected. Prevents the possibility that the UI allows the user to click on an already-selected sort option.
1 parent 233a5b4 commit 90e5d0c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

RetailCoder.VBE/Navigation/CodeExplorer/CodeExplorerViewModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,23 @@ public CodeExplorerViewModel(FolderHelper folderHelper, RubberduckParserState st
9797

9898
SetNameSortCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), param =>
9999
{
100+
if ((bool)param == true)
101+
{
100102
SortByName = (bool)param;
101103
SortByCodeOrder = !(bool)param;
104+
}
102105
}, param =>
103106
{
104107
return SortByName ? false : true;
105108
});
106109

107110
SetCodeOrderSortCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), param =>
108111
{
112+
if ((bool)param == true)
113+
{
109114
SortByCodeOrder = (bool)param;
110115
SortByName = !(bool)param;
116+
};
111117
}, param =>
112118
{
113119
return SortByCodeOrder ? false : true;

0 commit comments

Comments
 (0)