mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-08 06:45:45 -05:00
fix: auto-select first part and refresh quantity in CadConverter file list
Fire SelectedIndexChanged when the first item is added so the preview loads automatically. Invalidate the file list after quantity changes so the badge repaints immediately. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d5b5ab57e3
commit
f626fbe063
2 files changed
+9
-3
No files matched your search
@@ -63,7 +63,11 @@ namespace OpenNest.Controls
|
||||
public void AddItem(FileListItem item)
|
||||
{
|
||||
items.Add(item);
|
||||
if (items.Count == 1) selectedIndex = 0;
|
||||
if (items.Count == 1)
|
||||
{
|
||||
selectedIndex = 0;
|
||||
SelectedIndexChanged?.Invoke(this, selectedIndex);
|
||||
}
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
|
||||
@@ -194,8 +194,10 @@ namespace OpenNest.Forms
|
||||
private void OnQuantityChanged(object sender, EventArgs e)
|
||||
{
|
||||
var item = CurrentItem;
|
||||
if (item != null)
|
||||
item.Quantity = (int)numQuantity.Value;
|
||||
if (item == null) return;
|
||||
|
||||
item.Quantity = (int)numQuantity.Value;
|
||||
fileList.Invalidate();
|
||||
}
|
||||
|
||||
private void OnCustomerChanged(object sender, EventArgs e)
|
||||
|
||||
Reference in new issue
Block a user