Skip to content

Commit

Permalink
fixed single item movement did not deselect other selected Items
Browse files Browse the repository at this point in the history
fixed: on the right hand side of externaloutputs it was not possible to drag drop items to.
  • Loading branch information
aignermax committed Jul 3, 2024
1 parent 81c23fd commit 644d195
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Connect-A-Pic-Core/Helpers/UniqueObservableCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ private bool IsItemInCollection(T item)
}
return false;
}
protected override void ClearItems()
{
while (Items.Count > 0)
{
RemoveItem(0);
}
}

protected override void SetItem(int index, T item)
{
Expand Down
2 changes: 1 addition & 1 deletion Scenes/ExternalPorts/external_port.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ texture_filter = 1
offset_left = -127.0
offset_right = 127.0
offset_bottom = 63.0
mouse_filter = 1
mouse_filter = 2
theme = ExtResource("6_o1h0x")
theme_override_font_sizes/normal_font_size = 16
bbcode_enabled = true
Expand Down
1 change: 1 addition & 0 deletions Scripts/ViewModel/Commands/MoveComponentCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ private void StoreSelectedElementsForUndo()
private void SelectMovedComponents(HashSet<(Component component, IntVector Target)> componentAndTargets)
{
SelectionManager.Selections.Clear();

foreach (var componentAndTarget in componentAndTargets)
{
SelectionManager.Selections.Add(new IntVector(componentAndTarget.component.GridXMainTile, componentAndTarget.component.GridYMainTile));
Expand Down

0 comments on commit 644d195

Please sign in to comment.