If make has only one model, automatically select that model.

This commit is contained in:
gregory-diaz 2014-07-16 14:13:49 -07:00
parent 6da8b5326f
commit 156fd749c3
2 changed files with 12 additions and 2 deletions

View file

@ -94,12 +94,21 @@ namespace MatterHackers.MatterControl
ModelDropList.AddItem(model);
}
}
ModelDropList.AddItem(LocalizedString.Get("Other"));
ModelDropList.AddItem(LocalizedString.Get("Other"));
AddChild(ModelDropList);
HAnchor = HAnchor.FitToChildren;
VAnchor = VAnchor.FitToChildren;
}
public void SelectIfOnlyOneModel()
{
if (ModelDropList.MenuItems.Count == 2)
{
ModelDropList.SelectedIndex = 0;
}
}
}
}