Skip to content
Permalink
Browse files

Fix Abandon Edit

  • Loading branch information
WandererFan committed May 29, 2019
1 parent 74737f7 commit be257182bafc6062a7a36d7a37fd4d5c7fa10adb
Showing with 10 additions and 1 deletion.
  1. +5 −0 src/Mod/TechDraw/Gui/QGEPath.cpp
  2. +5 −1 src/Mod/TechDraw/Gui/QGILeaderLine.cpp
@@ -252,6 +252,11 @@ void QGEPath::restoreState()
{
// Base::Console().Message("QGEPath::restoreState()\n");
inEdit(false);
if (m_ghost != nullptr) {
if (m_ghost->scene() != nullptr) {
scene()->removeItem(m_ghost); //stop ghost from messing up brect
}
}
m_deltas = m_saveDeltas;
updatePath();
}
@@ -265,6 +265,7 @@ void QGILeaderLine::startPathEdit(void)

void QGILeaderLine::saveState(void)
{
// Base::Console().Message("QGILL::saveState()\n");
auto leadFeat = getFeature();
if (leadFeat != nullptr) {
m_savePoints = leadFeat->WayPoints.getValues();
@@ -275,11 +276,13 @@ void QGILeaderLine::saveState(void)

void QGILeaderLine::restoreState(void)
{
// Base::Console().Message("QGILL::restoreState()\n");
auto leadFeat = getFeature();
if (leadFeat != nullptr) {
leadFeat->WayPoints.setValues(m_savePoints);
leadFeat->X.setValue(m_saveX);
leadFeat->Y.setValue(m_saveY);
leadFeat->recomputeFeature();
}
}

@@ -487,9 +490,10 @@ void QGILeaderLine::setArrows(std::vector<QPointF> pathPoints)

void QGILeaderLine::abandonEdit(void)
{
//// Base::Console().Message("QGIL::abandonEdit()\n");
// Base::Console().Message("QGIL::abandonEdit()\n");
m_line->clearMarkers();
m_line->restoreState();
restoreState();
}

double QGILeaderLine::getScale(void)

0 comments on commit be25718

Please sign in to comment.
You can’t perform that action at this time.