Remove needToAddSubGroup bool, use presence of content as indicator
This commit is contained in:
parent
6c5d3bda14
commit
0c3f3a94b1
1 changed files with 1 additions and 4 deletions
|
|
@ -269,14 +269,11 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
var subGroupLayoutTopToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom);
|
||||
subGroupLayoutTopToBottom.AnchorAll();
|
||||
|
||||
bool needToAddSubGroup = false;
|
||||
foreach (OrganizerSubGroup subGroup in group.SubGroupsList)
|
||||
{
|
||||
var section = AddSettingRowsForSubgroup(subGroup, oemAndUserContext, showHelpControls);
|
||||
if (section != null)
|
||||
{
|
||||
needToAddSubGroup = true;
|
||||
|
||||
var groupBox = new AltGroupBox(subGroup.Name.Localize())
|
||||
{
|
||||
TextColor = ActiveTheme.Instance.PrimaryTextColor,
|
||||
|
|
@ -291,7 +288,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
}
|
||||
|
||||
if (needToAddSubGroup)
|
||||
if (subGroupLayoutTopToBottom.Children.Count > 0)
|
||||
{
|
||||
var scrollOnGroupTab = new SliceSettingListControl();
|
||||
subGroupLayoutTopToBottom.VAnchor = VAnchor.Fit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue