[Sketcher] Fix corner-case issue creating periodic b-splines

See: https://github.com/FreeCAD/FreeCAD/pull/8530#issuecomment-1474824366.
This commit is contained in:
Ajinkya Dahale
2023-03-18 23:23:55 +05:30
committed by abdullahtahiriyo
parent d2d69e274c
commit 60e79a14e4

View File

@@ -592,6 +592,26 @@ private:
tryAutoRecomputeIfNotSolve(
static_cast<Sketcher::SketchObject*>(sketchgui->getObject()));
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/Mod/Sketcher");
bool continuousMode = hGrp->GetBool("ContinuousCreationMode", true);
if (continuousMode) {
// This code enables the continuous creation mode.
resetHandlerState();
drawCursorToPosition(position);
/* It is ok not to call to purgeHandler
* in continuous creation mode because the
* handler is destroyed by the quit() method on pressing the
* right button of the mouse */
}
else {
sketchgui
->purgeHandler();// no code after this line, Handler get deleted in ViewProvider
}
return false;
}