fix out of range error when searching visject cm
This commit is contained in:
@@ -594,7 +594,7 @@ namespace FlaxEditor.Surface.ContextMenu
|
|||||||
|
|
||||||
// Update groups
|
// Update groups
|
||||||
LockChildrenRecursive();
|
LockChildrenRecursive();
|
||||||
var contextSensitiveSelectedBox = _contextSensitiveSearchEnabled ? _selectedBoxes[0] : null;
|
var contextSensitiveSelectedBox = _contextSensitiveSearchEnabled && _selectedBoxes.Count > 0 ? _selectedBoxes[0] : null;
|
||||||
for (int i = 0; i < _groups.Count; i++)
|
for (int i = 0; i < _groups.Count; i++)
|
||||||
{
|
{
|
||||||
_groups[i].UpdateFilter(_searchBox.Text, contextSensitiveSelectedBox);
|
_groups[i].UpdateFilter(_searchBox.Text, contextSensitiveSelectedBox);
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ namespace FlaxEditor.Surface
|
|||||||
IConnectionInstigator currentInstigator = instigators[i];
|
IConnectionInstigator currentInstigator = instigators[i];
|
||||||
Float2 currentStartPosition = currentInstigator.ConnectionOrigin;
|
Float2 currentStartPosition = currentInstigator.ConnectionOrigin;
|
||||||
|
|
||||||
// Check if mouse is over any of box
|
// Check if mouse is over any box
|
||||||
if (_lastInstigatorUnderMouse != null && !cmVisible)
|
if (_lastInstigatorUnderMouse != null && !cmVisible)
|
||||||
{
|
{
|
||||||
// Check if can connect objects
|
// Check if can connect objects
|
||||||
|
|||||||
Reference in New Issue
Block a user