浏览代码

bug fix

/main
xingwei.zhu 5 年前
当前提交
55ca454e
共有 3 个文件被更改,包括 7 次插入7 次删除
  1. 8
      Runtime/ui/txt/paragraph.cs
  2. 4
      Runtime/widgets/list_wheel_scroll_view.cs
  3. 2
      Runtime/widgets/sliver.cs

8
Runtime/ui/txt/paragraph.cs


(!ReferenceEquals(item.Value, null) && item.Value.Equals(this.root.Value)));
}
public KeyValuePair<TKey, TValue> First() {
public KeyValuePair<TKey, TValue>? First() {
throw new NullReferenceException("The root of this tree is null!");
return null;
}
while (t.LeftChild != null) {

return new KeyValuePair<TKey, TValue>(t.Key, t.Value);
}
public KeyValuePair<TKey, TValue> Last() {
public KeyValuePair<TKey, TValue>? Last() {
throw new NullReferenceException("The root of this tree is null!");
return null;
}
while (t.RightChild != null) {

4
Runtime/widgets/list_wheel_scroll_view.cs


return;
}
int firstIndex = this._childElements.First().Key;
int lastIndex = this._childElements.Last().Key;
int firstIndex = this._childElements.First()?.Key ?? 0;
int lastIndex = this._childElements.Last()?.Key ?? 0;
for (int index = firstIndex; index <= lastIndex; ++index) {
Element newChild = this.updateChild(this._childElements[index], this.retrieveWidget(index), index);

2
Runtime/widgets/sliver.cs


// processElement may modify the Map - need to do a .toList() here.
this._childElements.Keys.ToList().ForEach(action: processElement);
if (this._didUnderflow) {
var lastKey = this._childElements?.Last().Key ?? -1;
var lastKey = this._childElements?.Last()?.Key ?? -1;
processElement(lastKey + 1);
}
}

正在加载...
取消
保存