mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixed ctrl+click Go To Definition timing issue
This commit is contained in:
parent
14609dc636
commit
c3b697c0a4
2 changed files with 8 additions and 1 deletions
|
@ -45,6 +45,7 @@ namespace Beefy.widgets
|
||||||
public bool mIsMainWindow;
|
public bool mIsMainWindow;
|
||||||
|
|
||||||
public MouseFlag mMouseFlags;
|
public MouseFlag mMouseFlags;
|
||||||
|
public KeyFlags mMouseDownKeyFlags;
|
||||||
public Widget mRootWidget;
|
public Widget mRootWidget;
|
||||||
public Widget mCaptureWidget;
|
public Widget mCaptureWidget;
|
||||||
public Widget mOverWidget;
|
public Widget mOverWidget;
|
||||||
|
@ -628,6 +629,9 @@ namespace Beefy.widgets
|
||||||
{
|
{
|
||||||
let oldFlags = mMouseFlags;
|
let oldFlags = mMouseFlags;
|
||||||
|
|
||||||
|
if (mMouseFlags == 0)
|
||||||
|
mMouseDownKeyFlags = GetKeyFlags();
|
||||||
|
|
||||||
mMouseFlags |= (MouseFlag)(1 << btn);
|
mMouseFlags |= (MouseFlag)(1 << btn);
|
||||||
if ((!mHasFocus) && (mParent == null))
|
if ((!mHasFocus) && (mParent == null))
|
||||||
{
|
{
|
||||||
|
@ -723,6 +727,8 @@ namespace Beefy.widgets
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mMouseFlags == 0)
|
||||||
|
mMouseDownKeyFlags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReleaseMouseCaptures()
|
public void ReleaseMouseCaptures()
|
||||||
|
@ -813,6 +819,7 @@ namespace Beefy.widgets
|
||||||
return;
|
return;
|
||||||
|
|
||||||
newMouseWindow.mMouseFlags = mMouseFlags;
|
newMouseWindow.mMouseFlags = mMouseFlags;
|
||||||
|
newMouseWindow.mMouseDownKeyFlags = mMouseDownKeyFlags;
|
||||||
newMouseWindow.CaptureMouse();
|
newMouseWindow.CaptureMouse();
|
||||||
mMouseFlags = default;
|
mMouseFlags = default;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3592,7 +3592,7 @@ namespace IDE.ui
|
||||||
var useX = x;
|
var useX = x;
|
||||||
var useY = y;
|
var useY = y;
|
||||||
|
|
||||||
if ((btn == 0) && (mWidgetWindow.IsKeyDown(.Control)) && (x == origX) && (y == origY))
|
if ((btn == 0) && (mWidgetWindow.mMouseDownKeyFlags.HasFlag(.Ctrl)) && (x == origX) && (y == origY))
|
||||||
{
|
{
|
||||||
gApp.GoToDefinition(false);
|
gApp.GoToDefinition(false);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue