Skip to content

Commit 233a5b4

Browse files
Disable Sort menuitems if their options are already enabled. Fixes a hole where it was possible to effectively "deselect" a sort option.
1 parent e1785d2 commit 233a5b4

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
@@ -99,12 +99,18 @@ public CodeExplorerViewModel(FolderHelper folderHelper, RubberduckParserState st
9999
{
100100
SortByName = (bool)param;
101101
SortByCodeOrder = !(bool)param;
102+
}, param =>
103+
{
104+
return SortByName ? false : true;
102105
});
103106

104107
SetCodeOrderSortCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), param =>
105108
{
106109
SortByCodeOrder = (bool)param;
107110
SortByName = !(bool)param;
111+
}, param =>
112+
{
113+
return SortByCodeOrder ? false : true;
108114
});
109115
}
110116

0 commit comments

Comments
 (0)