Enable FullRowSelect on ErrorValidationRows with fixes
- Issue MatterHackers/MCCentral#5618 Print validation error rows are not clickable
This commit is contained in:
parent
aae2976c95
commit
c46b3f519e
2 changed files with 11 additions and 6 deletions
|
|
@ -77,7 +77,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
errorDetails = validationError.Details ?? "";
|
||||
}
|
||||
|
||||
var row = new SettingsRow(errorText, errorDetails, theme, validationError.ErrorLevel == ValidationErrorLevel.Error ? errorImage : warningImage)
|
||||
var row = new SettingsRow(errorText, errorDetails, theme, validationError.ErrorLevel == ValidationErrorLevel.Error ? errorImage : warningImage, fullRowSelect: true)
|
||||
{
|
||||
ArrowDirection = ArrowDirection.Left
|
||||
};
|
||||
|
|
@ -89,7 +89,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
VAnchor = VAnchor.Center,
|
||||
Margin = new BorderDouble(right: 8),
|
||||
Enabled = action.IsEnabled == null || action.IsEnabled()
|
||||
Enabled = action.IsEnabled == null || action.IsEnabled()
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(action.ID))
|
||||
|
|
@ -105,15 +105,17 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
|
||||
row.AddChild(button);
|
||||
|
||||
row.ActionWidget = button;
|
||||
row.FullRowSelect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Show info indicator hinting that hover will reveal additional details
|
||||
var button = new IconButton(infoImage, theme)
|
||||
row.AddChild(new IconButton(infoImage, theme)
|
||||
{
|
||||
Selectable = false
|
||||
};
|
||||
row.AddChild(button);
|
||||
});
|
||||
}
|
||||
|
||||
if (validationError.ErrorLevel == ValidationErrorLevel.Warning)
|
||||
|
|
@ -130,6 +132,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
|
||||
row.AddChild(dismissButton);
|
||||
|
||||
// Enable selection without regard to FullRowSelect
|
||||
dismissButton.Selectable = true;
|
||||
}
|
||||
|
||||
this.AddChild(row);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue