Beispiel #1
0
static void
SavePolarShape(SubForm &form, PolarShape &shape)
{
  PolarShapeEditWidget &widget = GetShapeEditor(form);
  bool changed = false, require_restart = false;
  widget.Save(changed, require_restart);
  shape = widget.GetPolarShape();
}
static bool
SavePolarShape(SubForm &form, PolarShape &shape)
{
  PolarShapeEditWidget &widget = GetShapeEditor(form);
  bool changed = false, require_restart = false;
  if (!widget.Save(changed, require_restart))
    return false;

  shape = widget.GetPolarShape();
  return true;
}
Beispiel #3
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);
}
Beispiel #4
0
bool
PlanePolarWidget::Save(bool &_changed)
{
  bool changed = false;

  PolarShapeEditWidget &widget = GetShapeEditor();
  if (widget.Save(changed)) {
    if (widget.GetPolarShape().IsValid())
      plane.polar_shape = widget.GetPolarShape();
  }

  changed |= SaveValue(REFERENCE_MASS, plane.reference_mass);
  changed |= SaveValue(DRY_MASS, plane.dry_mass);

  _changed |= changed;
  return true;
}
Beispiel #5
0
void
PlanePolarWidget::UpdateInvalidLabel()
{
  PolarShapeEditWidget &widget = GetShapeEditor();
  bool changed = false;
  bool valid = widget.Save(changed) &&
    widget.GetPolarShape().IsValid();
  bool visible = !valid;

  SetRowVisible(INVALID, visible);

  if (visible) {
    TextWidget &widget = (TextWidget &)GetRowWidget(INVALID);
    widget.SetText(_("Invalid"));
    widget.SetColor(COLOR_RED);
  }
}
Beispiel #6
0
 void LoadPolarShape(const PolarShape &shape) {
   GetShapeEditor().SetPolarShape(shape);
 }
static void
LoadPolarShape(SubForm &form, const PolarShape &shape)
{
  GetShapeEditor(form).SetPolarShape(shape);
}