mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 00:20:25 +02:00
Fixed issues with key settings, particularly clearing a key binding
This commit is contained in:
parent
a5ccbab43e
commit
07c2166321
2 changed files with 16 additions and 3 deletions
|
@ -6846,6 +6846,11 @@ namespace IDE
|
|||
|
||||
var window = (WidgetWindow)evt.mSender;
|
||||
|
||||
if (window.mFocusWidget is KeysEditWidget)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IDECommand.ContextFlags useFlags = .None;
|
||||
var activeWindow = GetActiveWindow();
|
||||
bool isMainWindow = activeWindow.mRootWidget is MainFrame;
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace IDE.ui
|
|||
{
|
||||
if ((evt.mKeyFlags == 0) &&
|
||||
((evt.mKeyCode == .Delete) || (evt.mKeyCode == .Backspace)) &&
|
||||
(Content.HasSelection()))
|
||||
((Content.HasSelection()) || (!HasKeys)))
|
||||
{
|
||||
if ((evt.mKeyCode == .Delete) || (evt.mKeyCode == .Backspace))
|
||||
{
|
||||
|
@ -949,10 +949,11 @@ namespace IDE.ui
|
|||
|
||||
if (curVariantType == typeof(List<KeyState>))
|
||||
{
|
||||
if (!newValue.IsEmpty && !newValue.StartsWith("<"))
|
||||
if (!newValue.StartsWith("<"))
|
||||
{
|
||||
let entries = new List<KeyState>();
|
||||
KeyState.Parse(newValue, entries);
|
||||
if (!newValue.IsEmpty)
|
||||
KeyState.Parse(newValue, entries);
|
||||
editingProp.mCurValue = Variant.Create(entries, true);
|
||||
}
|
||||
else
|
||||
|
@ -1386,6 +1387,13 @@ namespace IDE.ui
|
|||
|
||||
var str = scope String();
|
||||
KeyState.ToString(keyList, str);
|
||||
if (str.IsEmpty)
|
||||
{
|
||||
let origEntry = propEntry.mOrigValue.Get<List<KeyState>>();
|
||||
if (!origEntry.IsEmpty)
|
||||
str.Append("< Removed >");
|
||||
}
|
||||
|
||||
valueItem.Label = str;
|
||||
}
|
||||
else if (curVariantType.IsGenericType)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue