diff --git a/librecad/src/actions/rs_actiondrawcirclecr.cpp b/librecad/src/actions/rs_actiondrawcirclecr.cpp index 79b9b1c7f6..1248006a64 100644 --- a/librecad/src/actions/rs_actiondrawcirclecr.cpp +++ b/librecad/src/actions/rs_actiondrawcirclecr.cpp @@ -73,7 +73,15 @@ void RS_ActionDrawCircleCR::trigger() { *data); circle->setLayerToActive(); circle->setPenToActive(); - container->addEntity(circle); + + switch(getStatus()) { + case SetCenter: + container->addEntity(circle); + graphicView->moveRelativeZero(circle->getCenter()); + break; + case SetRadius: + break; + } // upd. undo list: if (document) { @@ -82,7 +90,6 @@ void RS_ActionDrawCircleCR::trigger() { document->endUndoCycle(); } graphicView->redraw(RS2::RedrawDrawing); - graphicView->moveRelativeZero(circle->getCenter()); setStatus(SetCenter); diff --git a/librecad/src/cmd/rs_commands.cpp b/librecad/src/cmd/rs_commands.cpp index ed0c4c0f46..c91414de21 100644 --- a/librecad/src/cmd/rs_commands.cpp +++ b/librecad/src/cmd/rs_commands.cpp @@ -202,6 +202,12 @@ RS_Commands::RS_Commands() { {{"c3", QObject::tr("c3", "circle 3 points")}}, RS2::ActionDrawCircle3P }, + //draw circle with point and radius + { + {{"circlecr", QObject::tr("circlecr", "circle with center and radius")}}, + {{"cc", QObject::tr("cc", "circle with center and radius")}}, + RS2::ActionDrawCircleCR + }, //draw circle tangent to 3 objects { {{"tan3", QObject::tr("tan3", "circle tangent to 3")}},