mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-06 06:43:49 +00:00
Improve handling of SharedData
This commit is contained in:
parent
0b86664002
commit
092f96a9ab
3 changed files with 5 additions and 5 deletions
|
|
@ -126,8 +126,6 @@ namespace PowerControl
|
|||
|
||||
if (ActiveOption == null)
|
||||
ActiveOption = Options.First();
|
||||
if (SelectedOption == null)
|
||||
SelectedOption = ActiveOption;
|
||||
|
||||
onUpdateToolStrip();
|
||||
}
|
||||
|
|
@ -171,7 +169,7 @@ namespace PowerControl
|
|||
return;
|
||||
|
||||
foreach (ToolStripMenuItem item in toolStripItem.DropDownItems)
|
||||
item.Checked = (item.Tag.ToString() == SelectedOption.ToString());
|
||||
item.Checked = Object.Equals(item.Tag, SelectedOption ?? ActiveOption);
|
||||
|
||||
toolStripItem.Visible = Visible && Options.Count > 0;
|
||||
}
|
||||
|
|
@ -254,7 +252,7 @@ namespace PowerControl
|
|||
else
|
||||
output += Color(Name + ":", Colors.Blue).PadRight(30);
|
||||
|
||||
output += optionText(SelectedOption);
|
||||
output += optionText(SelectedOption ?? ActiveOption);
|
||||
|
||||
if (!Object.Equals(ActiveOption, SelectedOption))
|
||||
output += " (active: " + optionText(ActiveOption) + ")";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue