mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed some selection issues
This commit is contained in:
parent
1e446a655c
commit
af9ac0b918
1 changed files with 13 additions and 6 deletions
|
@ -525,7 +525,8 @@ namespace Beefy.widgets
|
|||
{
|
||||
None,
|
||||
Dragging,
|
||||
ClickedInside
|
||||
ClickedInside,
|
||||
DraggingInside
|
||||
}
|
||||
|
||||
public Data mData ~ _.Deref(this);
|
||||
|
@ -798,7 +799,7 @@ namespace Beefy.widgets
|
|||
}
|
||||
else if (!mWidgetWindow.IsKeyDown(KeyCode.Shift))
|
||||
{
|
||||
if ((mSelection != null) && (CursorTextPos >= mSelection.Value.MinPos) && (CursorTextPos <= mSelection.Value.MaxPos))
|
||||
if ((mSelection != null) && (CursorTextPos > mSelection.Value.MinPos) && (CursorTextPos < mSelection.Value.MaxPos))
|
||||
{
|
||||
if (hadSelection)
|
||||
{
|
||||
|
@ -835,7 +836,9 @@ namespace Beefy.widgets
|
|||
MoveCursorToCoord(x, y);
|
||||
ClampCursor();
|
||||
if (mDragSelectionKind == .Dragging)
|
||||
SelectToCursor();
|
||||
SelectToCursor();
|
||||
else if (mDragSelectionKind == .ClickedInside)
|
||||
mDragSelectionKind = .DraggingInside;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2004,8 +2007,11 @@ namespace Beefy.widgets
|
|||
{
|
||||
String selText = scope String();
|
||||
GetSelectionText(selText);
|
||||
BFApp.sApp.SetClipboardText(selText);
|
||||
DeleteSelection();
|
||||
if (!selText.IsEmpty)
|
||||
{
|
||||
BFApp.sApp.SetClipboardText(selText);
|
||||
DeleteSelection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2013,7 +2019,8 @@ namespace Beefy.widgets
|
|||
{
|
||||
String selText = scope String();
|
||||
GetSelectionText(selText);
|
||||
BFApp.sApp.SetClipboardText(selText);
|
||||
if (!selText.IsEmpty)
|
||||
BFApp.sApp.SetClipboardText(selText);
|
||||
}
|
||||
|
||||
public void PasteText()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue