Example #1
0
static void
UpdateInvalidLabel()
{
  PolarCoefficients coeff =
      PolarCoefficients::From3VW(plane.v1, plane.v2, plane.v3,
                                 plane.w1, plane.w2, plane.w3);
  bool visible = !coeff.IsValid();

  WndFrame *label = ((WndFrame *)dialog->FindByName(_T("InvalidLabel")));
  assert(label != NULL);
  label->SetVisible(visible);
}
Example #2
0
static void
UpdateInvalidLabel()
{
  PolarShapeEditWidget &widget = GetShapeEditor(*dialog);
  bool changed = false, require_restart = false;
  bool valid = widget.Save(changed, require_restart) &&
    widget.GetPolarShape().IsValid();
  bool visible = !valid;

  WndFrame *label = ((WndFrame *)dialog->FindByName(_T("InvalidLabel")));
  assert(label != NULL);
  label->SetVisible(visible);
}