mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-13 22:04:09 +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,
|
None,
|
||||||
Dragging,
|
Dragging,
|
||||||
ClickedInside
|
ClickedInside,
|
||||||
|
DraggingInside
|
||||||
}
|
}
|
||||||
|
|
||||||
public Data mData ~ _.Deref(this);
|
public Data mData ~ _.Deref(this);
|
||||||
|
@ -798,7 +799,7 @@ namespace Beefy.widgets
|
||||||
}
|
}
|
||||||
else if (!mWidgetWindow.IsKeyDown(KeyCode.Shift))
|
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)
|
if (hadSelection)
|
||||||
{
|
{
|
||||||
|
@ -835,7 +836,9 @@ namespace Beefy.widgets
|
||||||
MoveCursorToCoord(x, y);
|
MoveCursorToCoord(x, y);
|
||||||
ClampCursor();
|
ClampCursor();
|
||||||
if (mDragSelectionKind == .Dragging)
|
if (mDragSelectionKind == .Dragging)
|
||||||
SelectToCursor();
|
SelectToCursor();
|
||||||
|
else if (mDragSelectionKind == .ClickedInside)
|
||||||
|
mDragSelectionKind = .DraggingInside;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2004,8 +2007,11 @@ namespace Beefy.widgets
|
||||||
{
|
{
|
||||||
String selText = scope String();
|
String selText = scope String();
|
||||||
GetSelectionText(selText);
|
GetSelectionText(selText);
|
||||||
BFApp.sApp.SetClipboardText(selText);
|
if (!selText.IsEmpty)
|
||||||
DeleteSelection();
|
{
|
||||||
|
BFApp.sApp.SetClipboardText(selText);
|
||||||
|
DeleteSelection();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2013,7 +2019,8 @@ namespace Beefy.widgets
|
||||||
{
|
{
|
||||||
String selText = scope String();
|
String selText = scope String();
|
||||||
GetSelectionText(selText);
|
GetSelectionText(selText);
|
||||||
BFApp.sApp.SetClipboardText(selText);
|
if (!selText.IsEmpty)
|
||||||
|
BFApp.sApp.SetClipboardText(selText);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PasteText()
|
public void PasteText()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue