mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 15:46:05 +02:00
Improved ListView cursor key handling, removed debug NOPs
This commit is contained in:
parent
959da9884c
commit
987adaec5c
26 changed files with 87 additions and 211 deletions
|
@ -409,11 +409,6 @@ namespace IDE.ui
|
|||
let dispWidth = g.mFont.GetWidth(selectedEntry.mEntryDisplay) + GS!(24);
|
||||
|
||||
float width = mWidth - GS!(16) - mAutoCompleteListWidget.mRightBoxAdjust;
|
||||
if (gApp.mMainWindow.IsKeyDown(.Alt))
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
if (mAutoCompleteListWidget.mVertScrollbar != null)
|
||||
width -= GS!(18);
|
||||
width = Math.Max(dispWidth, width);
|
||||
|
@ -1651,11 +1646,6 @@ namespace IDE.ui
|
|||
gApp.mAutoCompletePanel.FinishBind();
|
||||
SetIgnoreMove(false);
|
||||
|
||||
if (changedAfterInfo)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
if ((mAutoCompleteListWidget != null) && (!mAutoCompleteListWidget.mIsInitted))
|
||||
mAutoCompleteListWidget.Init();
|
||||
if ((mInvokeWidget != null) && (!mInvokeWidget.mIsInitted))
|
||||
|
|
|
@ -28,7 +28,6 @@ namespace IDE.ui
|
|||
|
||||
public ~this()
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -534,11 +534,6 @@ namespace IDE.ui
|
|||
{
|
||||
checkIdx++;
|
||||
|
||||
if (checkIdx == 0x82)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
line.Reference(lineStrView);
|
||||
if (line.Length == 0)
|
||||
break;
|
||||
|
|
|
@ -25,12 +25,7 @@ namespace IDE.ui
|
|||
|
||||
public ~this()
|
||||
{
|
||||
//Debug.Assert((mWatchSeriesInfo == null) || (mWatchSeriesInfo.mMoreButton == null));
|
||||
|
||||
if (mWatchSeriesInfo != null)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,18 +42,10 @@ namespace IDE.ui
|
|||
|
||||
public this(IWatchOwner watchOwner, HoverListView listView) : base(watchOwner, listView)
|
||||
{
|
||||
if (mHLVItemId == 8)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
}
|
||||
|
||||
public ~this()
|
||||
{
|
||||
if (mHLVItemId == 8)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
}
|
||||
|
||||
public override WatchListViewItem GetWatchListViewItemParent()
|
||||
|
@ -204,11 +191,6 @@ namespace IDE.ui
|
|||
|
||||
public override void Resize(float x, float y, float width, float height)
|
||||
{
|
||||
if (width < mWidth)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
base.Resize(x, y, width, height);
|
||||
}
|
||||
}
|
||||
|
@ -293,17 +275,6 @@ namespace IDE.ui
|
|||
public ~this()
|
||||
{
|
||||
//Debug.WriteLine("HoverWatch.~this {0}", this);
|
||||
|
||||
if (!String.IsNullOrEmpty(mOrigEvalString))
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
if (mListView != null)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
@ -948,11 +919,6 @@ namespace IDE.ui
|
|||
//var font = DarkTheme.sDarkTheme.mSmallFont;
|
||||
var listView = new HoverListView(this);
|
||||
|
||||
if (mListView != null)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
//Debug.WriteLine("HoverWatch.CreateListView {0}", listView);
|
||||
|
||||
listView.mHoverWatch = this;
|
||||
|
|
|
@ -1407,6 +1407,12 @@ namespace IDE.ui
|
|||
clickedItem = (DarkListViewItem)clickedItem.GetSubItem(0);
|
||||
}
|
||||
|
||||
if (theEvent.mBtn != 0)
|
||||
{
|
||||
if (clickedItem.Selected)
|
||||
return;
|
||||
}
|
||||
|
||||
SelectItem(clickedItem, true);
|
||||
|
||||
if ((!clickedItem.IsParent) && (theEvent.mBtnCount > 1))
|
||||
|
|
|
@ -340,11 +340,6 @@ namespace IDE.ui
|
|||
}
|
||||
else
|
||||
{
|
||||
if (type.IsEnum)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
if (mApplyAction != null)
|
||||
{
|
||||
mApplyAction();
|
||||
|
|
|
@ -933,11 +933,6 @@ namespace IDE.ui
|
|||
|
||||
public bool Classify(ResolveType resolveType, ResolveParams resolveParams = null)
|
||||
{
|
||||
if (resolveType == .GetFixits)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
// Don't allow other classify calls interrupt a symbol rename
|
||||
if ((IDEApp.sApp.mSymbolReferenceHelper != null) && (IDEApp.sApp.mSymbolReferenceHelper.HasStarted) && (IDEApp.sApp.mSymbolReferenceHelper.mKind == SymbolReferenceHelper.Kind.Rename))
|
||||
return false;
|
||||
|
@ -1812,10 +1807,6 @@ namespace IDE.ui
|
|||
var sw = scope Stopwatch(true);
|
||||
sw.Start();
|
||||
bfSystem.Lock(1);
|
||||
if (sw.ElapsedMicroseconds > 100)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
bfSystem.PerfZoneEnd();
|
||||
}
|
||||
else
|
||||
|
@ -1865,11 +1856,6 @@ namespace IDE.ui
|
|||
parser.ClassifySource(char8Data, !mIsBeefSource);
|
||||
}
|
||||
|
||||
if (resolveType == .Autocomplete)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
if (!isBackground)
|
||||
{
|
||||
String autocompleteInfo = scope String();
|
||||
|
@ -5225,10 +5211,7 @@ namespace IDE.ui
|
|||
{
|
||||
for (int i < mProcessResolveCharData.Count)
|
||||
{
|
||||
if (mProcessResolveCharData[i].mDisplayFlags == 1)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MarkDirty();
|
||||
|
|
|
@ -87,11 +87,6 @@ namespace IDE.ui
|
|||
{
|
||||
if (mHoverWatch != null)
|
||||
{
|
||||
if (mHoverWatch.mCloseCountdown == 1)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
bool hasActiveHoverWatch = false;
|
||||
|
||||
if (mHoverWatch.mEditWidget != null)
|
||||
|
|
|
@ -24,11 +24,6 @@ namespace IDE.ui
|
|||
{
|
||||
if (mIsSelected != value)
|
||||
{
|
||||
if (!value)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
var threadListView = (ThreadListView)mListView;
|
||||
if (threadListView.mThreadPanel.mCallstackPopup != null)
|
||||
threadListView.mThreadPanel.mCallstackPopup.Close();
|
||||
|
|
|
@ -50,11 +50,6 @@ namespace IDE.ui
|
|||
else
|
||||
isValid = gApp.mBfResolveCompiler.VerifyTypeName(editText, cursorPos);
|
||||
|
||||
if (isValid)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
for (int ofs < editText.Length)
|
||||
{
|
||||
mEditWidgetContent.mData.mText[editOffset + ofs].mDisplayTypeId = isValid ? 0 : 1;
|
||||
|
|
|
@ -445,11 +445,6 @@ namespace IDE.ui
|
|||
public DarkButton mLessButton;
|
||||
public static int32 sIdx;
|
||||
public int32 mSeriesId = ++sIdx;
|
||||
|
||||
public ~this()
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
}
|
||||
|
||||
public class WatchRefreshButton : ButtonWidget
|
||||
|
@ -815,8 +810,8 @@ namespace IDE.ui
|
|||
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
mParent.UpdateAll();
|
||||
/*if (value)
|
||||
mParent.UpdateAll();*/
|
||||
base.Selected = value;
|
||||
}
|
||||
}
|
||||
|
@ -831,11 +826,6 @@ namespace IDE.ui
|
|||
|
||||
public this(IWatchOwner watchOwner, IDEListView listView)
|
||||
{
|
||||
if (mIdx == 670)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
|
||||
mWatchOwner = watchOwner;
|
||||
}
|
||||
|
||||
|
@ -1357,7 +1347,7 @@ namespace IDE.ui
|
|||
}
|
||||
|
||||
if ((forceDelete) ||
|
||||
((wantsDelete) && (idx != 0) && (curWatchListViewItem != null) && (curWatchListViewItem.mChildAreaHeight == 0)))
|
||||
((wantsDelete) && (idx != 0) && (curWatchListViewItem != null) && (curWatchListViewItem.mChildAreaHeight == 0) && (!curWatchListViewItem.mIsSelected)))
|
||||
{
|
||||
curMemberIdx--;
|
||||
mParentItem.RemoveChildItem(curWatchListViewItem);
|
||||
|
@ -1822,6 +1812,23 @@ namespace IDE.ui
|
|||
|
||||
SetupListViewItem(listViewItem, name, evalStr);
|
||||
|
||||
if ((parentItem != null) && (parentItem.Selected))
|
||||
{
|
||||
// If the parentItem is selected and the next item after the parentItem is selected then we may have a selection span
|
||||
// so we want to expand that selection to the newly-created item
|
||||
|
||||
int parentIdx = parentItem.mParentItem.GetIndexOfChild(parentItem);
|
||||
if (parentIdx + 1 < parentItem.mParentItem.mChildItems.Count)
|
||||
{
|
||||
let nextItem = parentItem.mParentItem.mChildItems[parentIdx + 1];
|
||||
if (nextItem.Selected)
|
||||
{
|
||||
if ((parentItem.mChildItems.Count == 1) || (parentItem.mChildItems[parentItem.mChildItems.Count - 2].Selected))
|
||||
listViewItem.Selected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return listViewItem;
|
||||
}
|
||||
|
||||
|
@ -2126,7 +2133,10 @@ namespace IDE.ui
|
|||
if (btnNum == 0)
|
||||
ListViewItemMouseDown(clickedItem, btnCount);
|
||||
else
|
||||
ListViewItemMouseDown(clickedItem, 1);
|
||||
{
|
||||
if (!clickedItem.GetSubItem(0).Selected)
|
||||
ListViewItemMouseDown(clickedItem, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void ClearWatchValues(ListViewItem parentListViewItem)
|
||||
|
@ -2436,7 +2446,7 @@ namespace IDE.ui
|
|||
}
|
||||
|
||||
if (memberVals.Count >= 2)
|
||||
{
|
||||
{
|
||||
WatchListViewItem memberItem;
|
||||
if (memberCount >= listViewItem.GetChildCount())
|
||||
{
|
||||
|
@ -2563,11 +2573,6 @@ namespace IDE.ui
|
|||
|
||||
while (curIdx < mListView.GetRoot().GetChildCount())
|
||||
parentItem.RemoveChildItemAt(curIdx);
|
||||
|
||||
if (parentItem.GetChildCount() == 0)
|
||||
{
|
||||
NOP!();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2755,7 +2760,7 @@ namespace IDE.ui
|
|||
void WithSelected(Action<ListViewItem> func)
|
||||
{
|
||||
var root = listView.GetRoot();
|
||||
root.WithSelectedItems(func);
|
||||
root.WithSelectedItems(func, false, true);
|
||||
|
||||
if (clickedHoverItem != null)
|
||||
func(clickedHoverItem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue