Skip to content

Commit 5ee4935

Browse files
committed
fix: operator precedence bug in version display and settings default mismatch
- Options.xaml.cs: Add parentheses around null-coalescing fallback so '?? 2.0.0' actually triggers when Version is null. Without parens, string concatenation always produces non-null, making fallback dead code. - Settings.settings: Change BitmapEffects default from True to False to match Settings.Designer.cs. Prevents silent flip if designer regenerates the file, preserving GPU auto-detection intent. Found by Opus code review.
1 parent 0c68ae2 commit 5ee4935

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Options.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected override void OnActivated(EventArgs e)
3131
base.OnActivated(e);
3232
Mouse.Capture(this, CaptureMode.SubTree);
3333
// Get version from assembly
34-
versionLabel.Text = "Version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "2.0.0";
34+
versionLabel.Text = "Version " + (System.Reflection.Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "2.0.0");
3535
}
3636

3737
protected override void OnDeactivated(EventArgs e)

Properties/Settings.settings

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
<Value Profile="(Default)">True</Value>
1010
</Setting>
1111
<Setting Name="BitmapEffects" Type="System.Boolean" Scope="User">
12-
<Value Profile="(Default)">True</Value>
12+
<Value Profile="(Default)">False</Value>
1313
</Setting>
14-
<Setting Name="ClearAfter" Type="System.Int32" Scope="User">
14+
<Setting Name="ClearAfter"Type="System.Int32" Scope="User">
1515
<Value Profile="(Default)">35</Value>
1616
</Setting>
1717
<Setting Name="MouseDraw" Type="System.Boolean" Scope="User">

0 commit comments

Comments
 (0)