fixes #0002710: Freecad doesn't show sketch elements added when overconstrained

issue #0002836: Crash in sketcher
This commit is contained in:
wmayer
2017-06-02 13:13:34 +02:00
parent 3d86498a43
commit 2004544e57
8 changed files with 212 additions and 695 deletions

View File

@@ -42,6 +42,8 @@
#include "ViewProviderSketch.h"
#include "ui_InsertDatum.h"
#include "EditDatumDialog.h"
#include "CommandConstraints.h"
using namespace SketcherGui;
@@ -164,17 +166,13 @@ void EditDatumDialog::exec(bool atCursor)
}
Gui::Command::commitCommand();
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
bool autoRecompute = hGrp->GetBool("AutoRecompute",false);
if (sketch->noRecomputes && sketch->ExpressionEngine.depsAreTouched()) {
sketch->ExpressionEngine.execute();
sketch->solve();
}
if(autoRecompute)
Gui::Command::updateActive();
tryAutoRecompute();
}
catch (const Base::Exception& e) {
QMessageBox::critical(qApp->activeWindow(), QObject::tr("Dimensional constraint"), QString::fromUtf8(e.what()));