fix: ordering
This commit is contained in:
@@ -63,6 +63,7 @@ namespace CarManagerV2
|
|||||||
{
|
{
|
||||||
// no changes
|
// no changes
|
||||||
Console.WriteLine($"[L] No changes for car: {car.Id}");
|
Console.WriteLine($"[L] No changes for car: {car.Id}");
|
||||||
|
flpCars.Controls.SetChildIndex(existing, _cars.IndexOf(car));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,10 +96,12 @@ namespace CarManagerV2
|
|||||||
};
|
};
|
||||||
detailsForm.ShowDialog();
|
detailsForm.ShowDialog();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isNew)
|
if (isNew)
|
||||||
{
|
{
|
||||||
flpCars.Controls.Add(card);
|
flpCars.Controls.Add(card);
|
||||||
}
|
}
|
||||||
|
flpCars.Controls.SetChildIndex(card, _cars.IndexOf(car));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove cards that are no longer in _cars
|
// Remove cards that are no longer in _cars
|
||||||
@@ -153,7 +156,7 @@ namespace CarManagerV2
|
|||||||
string query = tbxSearch.Text;
|
string query = tbxSearch.Text;
|
||||||
await Task.Delay(300); // debounce
|
await Task.Delay(300); // debounce
|
||||||
if(query != tbxSearch.Text) return; // text changed during delay
|
if(query != tbxSearch.Text) return; // text changed during delay
|
||||||
flpCars.Controls.Clear();
|
//flpCars.Controls.Clear();
|
||||||
if (string.IsNullOrWhiteSpace(query))
|
if (string.IsNullOrWhiteSpace(query))
|
||||||
{
|
{
|
||||||
refreshCars(cars);
|
refreshCars(cars);
|
||||||
|
|||||||
Reference in New Issue
Block a user