Merge pull request #2606 from wabbajack-tools/clickyfix

Fix for crash when right clicking or doubler clicking browser url or window bar.
This commit is contained in:
trawzified 2024-08-13 22:23:53 +02:00 committed by GitHub
commit 75a07ea050
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View File

@ -5,6 +5,7 @@
* This issue only affected Fallout 3, Fallout NV and Skyrim LE * This issue only affected Fallout 3, Fallout NV and Skyrim LE
* Added logging to determine which downloaded files cannot be hashed * Added logging to determine which downloaded files cannot be hashed
* This could occur in the downloading phase when installing a modlist when there are broken/corrupted files in the downloads folder * This could occur in the downloading phase when installing a modlist when there are broken/corrupted files in the downloads folder
* Fixed Wabbajack crashing when double-clicking the browser window titlebar or URL
#### Version - 3.7.0.0 - 6/21/2024 #### Version - 3.7.0.0 - 6/21/2024
* Added Starfield support * Added Starfield support

View File

@ -25,7 +25,6 @@ public partial class BrowserWindow : MetroWindow
{ {
InitializeComponent(); InitializeComponent();
_disposable = new CompositeDisposable(); _disposable = new CompositeDisposable();
_serviceProvider = serviceProvider; _serviceProvider = serviceProvider;
Browser = _serviceProvider.GetRequiredService<WebView2>(); Browser = _serviceProvider.GetRequiredService<WebView2>();
@ -43,7 +42,10 @@ public partial class BrowserWindow : MetroWindow
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e) private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
{ {
base.DragMove(); if (e.LeftButton == MouseButtonState.Pressed)
{
base.DragMove();
}
} }
private void BrowserWindow_OnActivated(object sender, EventArgs e) private void BrowserWindow_OnActivated(object sender, EventArgs e)

View File

@ -144,7 +144,10 @@ namespace Wabbajack
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e) private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
{ {
this.DragMove(); if (e.LeftButton == MouseButtonState.Pressed)
{
this.DragMove();
}
} }
} }