bool FaceColors::reject()
{
    int ret = QMessageBox::question(this, tr("Face colors"), tr("Do you really want to cancel?"),
        QMessageBox::Yes, QMessageBox::No|QMessageBox::Default|QMessageBox::Escape);
    if (ret == QMessageBox::Yes) {
        Gui::Document* doc = Gui::Application::Instance->getDocument(d->vp->getObject()->getDocument());
        doc->resetEdit();
        d->vp->DiffuseColor.setValues(d->current);
        return true;
    }
    else {
        return false;
    }
}
示例#2
0
bool TaskCSysDragger::accept()
{
  lastTranslationIncrement = dragger->translationIncrement.getValue();
  lastRotationIncrement = dragger->rotationIncrement.getValue();

  App::DocumentObject* dObject = vpObject.getObject();
  if (dObject) {
    Gui::Document* document = Gui::Application::Instance->getDocument(dObject->getDocument());
    assert(document);
    document->commitCommand();
    document->resetEdit();
    document->getDocument()->recompute();
  }
  return Gui::TaskView::TaskDialog::accept();
}
bool FaceColors::accept()
{
    Gui::Document* doc = Gui::Application::Instance->getDocument(d->vp->getObject()->getDocument());
    doc->resetEdit();
    return true;
}