From 7659bb0dae90bfd3280e9d3d0ce9716ab12b4f5d Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Tue, 23 Feb 2021 07:40:56 +0100 Subject: [PATCH] Sketcher: Work-around for expression engine failure to calculate dependencies ============================================================================= THIS IS A WORK-AROUND NOT TO DELAY 0.19 RELEASE depsAreTouched is not returning true in this case: https://forum.freecadweb.org/viewtopic.php?f=3&t=55633&p=481061#p478477 It appears related to a drastic change in how dependencies are calculated, see: https://forum.freecadweb.org/viewtopic.php?f=3&t=55633&p=481061#p481061 This is NOT the solution, as there is no point in systematically executing the ExpressionEngine on every dimensional constraint change. Just a quick fix to avoid clearly unwanted behaviour in absence of time to actually fix the root cause. --- src/Mod/Sketcher/Gui/EditDatumDialog.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/Gui/EditDatumDialog.cpp b/src/Mod/Sketcher/Gui/EditDatumDialog.cpp index e85e0d8bbc..2f5bf9b583 100644 --- a/src/Mod/Sketcher/Gui/EditDatumDialog.cpp +++ b/src/Mod/Sketcher/Gui/EditDatumDialog.cpp @@ -195,10 +195,22 @@ void EditDatumDialog::accepted() Gui::Command::commitCommand(); - if (sketch->noRecomputes && sketch->ExpressionEngine.depsAreTouched()) { + // THIS IS A WORK-AROUND NOT TO DELAY 0.19 RELEASE + // + // depsAreTouched is not returning true in this case: + // https://forum.freecadweb.org/viewtopic.php?f=3&t=55633&p=481061#p478477 + // + // It appears related to a drastic change in how dependencies are calculated, see: + // https://forum.freecadweb.org/viewtopic.php?f=3&t=55633&p=481061#p481061 + // + // This is NOT the solution, as there is no point in systematically executing the ExpressionEngine + // on every dimensional constraint change. Just a quick fix to avoid clearly unwanted behaviour in + // absence of time to actually fix the root cause. + + //if (sketch->noRecomputes && sketch->ExpressionEngine.depsAreTouched()) { sketch->ExpressionEngine.execute(); sketch->solve(); - } + //} tryAutoRecompute(sketch); }