mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed crash when text is selected and item gets moused over
This commit is contained in:
parent
33448603b1
commit
27d8f9df0f
1 changed files with 9 additions and 4 deletions
|
@ -188,14 +188,14 @@ namespace IDE.ui
|
|||
mFilterString = null;
|
||||
}
|
||||
|
||||
bool mShowingDropdown;
|
||||
bool mIgnoreShowDropdown;
|
||||
|
||||
public override MenuWidget ShowDropdown()
|
||||
{
|
||||
if (mShowingDropdown)
|
||||
if (mIgnoreShowDropdown)
|
||||
return null;
|
||||
mShowingDropdown = true;
|
||||
defer { mShowingDropdown = false; }
|
||||
mIgnoreShowDropdown = true;
|
||||
defer { mIgnoreShowDropdown = false; }
|
||||
|
||||
/*var stopWatch = scope Stopwatch();
|
||||
stopWatch.Start();*/
|
||||
|
@ -246,7 +246,12 @@ namespace IDE.ui
|
|||
void SelectionChanged(int selIdx)
|
||||
{
|
||||
if (mEditWidget.mEditWidgetContent.HasSelection())
|
||||
{
|
||||
bool prevIgnoreShowDropdown = mIgnoreShowDropdown;
|
||||
mIgnoreShowDropdown = true;
|
||||
mEditWidget.SetText("");
|
||||
mIgnoreShowDropdown = prevIgnoreShowDropdown;
|
||||
}
|
||||
}
|
||||
|
||||
public override void MenuClosed()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue