We have some options pages that have child pages, and I notice that once a child page is selected, navigation gets stuck and no other pages can be selected. A minimal reproduction of this error is found here (adapted from the Samples from GitHub). The SampleCsOptionsParentPage
is registered in the OnLoad
method of the plugin.
@dale
How do I properly register a child options page? In Rhino-5 the method below works.
internal class SampleCsOptionsParentPage : OptionsDialogPage
{
private UserControl m_control;
public SampleCsOptionsParentPage()
: base("Sample-Parent")
{
Children.Add(new SampleCsOptionsChildPage());
}
public override object PageControl
{
get { return m_control ?? (m_control = new UserControl()); }
}
public override bool OnApply()
{
RhinoApp.WriteLine("SampleCsOptionsParentPage.OnApply");
return true;
}
public override void OnCancel()
{
RhinoApp.WriteLine("SampleCsOptionsParentPage.OnCancel");
}
}
internal class SampleCsOptionsChildPage : StackedDialogPage
{
private SampleCsOptionsUserControl m_control;
public SampleCsOptionsChildPage()
: base("Sample-Child")
{
}
public override object PageControl
{
get { return m_control ?? (m_control = new SampleCsOptionsUserControl()); }
}
public override bool OnApply()
{
RhinoApp.WriteLine("SampleCsOptionsChildPage.OnApply");
return true;
}
public override void OnCancel()
{
RhinoApp.WriteLine("SampleCsOptionsChildPage.OnCancel");
}
}