Don't allow save pattern file if we just change size or height.

--HG--
branch : develop
This commit is contained in:
dismine 2014-02-05 16:03:26 +02:00
parent bc855ce265
commit aa054e2507
22 changed files with 21 additions and 2 deletions

View file

@ -139,7 +139,7 @@ public slots:
* @brief ChangedGrowth change new height value.
* @param text value height.
*/
void ChangedGrowth(const QString & text);
void ChangedHeight(const QString & text);
/**
* @brief ClosedActionTable actions after closing table with variables.
*/

View file

@ -75,6 +75,7 @@ void VToolAlongLine::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrFirstPoint, dialogAlongLine->getFirstPointId());
SetAttribute(domElement, AttrSecondPoint, dialogAlongLine->getSecondPointId());
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogAlongLine.clear();

View file

@ -149,6 +149,7 @@ void VToolArc::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrAngle1, dialogArc->GetF1());
SetAttribute(domElement, AttrAngle2, dialogArc->GetF2());
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogArc.clear();

View file

@ -171,6 +171,7 @@ void VToolBisector::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogBisector->getSecondPointId()));
SetAttribute(domElement, AttrThirdPoint, QString().setNum(dialogBisector->getThirdPointId()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogBisector.clear();

View file

@ -175,6 +175,7 @@ void VToolCutArc::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrLength, dialogCutArc->getFormula());
SetAttribute(domElement, AttrArc, QString().setNum(dialogCutArc->getArcId()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogCutArc.clear();

View file

@ -176,6 +176,7 @@ void VToolCutSpline::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrLength, dialogCutSpline->getFormula());
SetAttribute(domElement, AttrSpline, QString().setNum(dialogCutSpline->getSplineId()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogCutSpline.clear();

View file

@ -253,6 +253,7 @@ void VToolCutSplinePath::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrLength, dialogCutSplinePath->getFormula());
SetAttribute(domElement, AttrSplinePath, QString().setNum(dialogCutSplinePath->getSplinePathId()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogCutSplinePath.clear();

View file

@ -146,6 +146,7 @@ void VToolEndLine::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrAngle, QString().setNum(dialogEndLine->getAngle()));
SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogEndLine->getBasePointId()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogEndLine.clear();

View file

@ -147,6 +147,7 @@ void VToolHeight::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrP1Line, QString().setNum(dialogHeight->getP1LineId()));
SetAttribute(domElement, AttrP2Line, QString().setNum(dialogHeight->getP2LineId()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogHeight.clear();

View file

@ -121,6 +121,7 @@ void VToolLine::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogLine->getFirstPoint()));
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogLine->getSecondPoint()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogLine.clear();

View file

@ -152,6 +152,7 @@ void VToolLineIntersect::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrP1Line2, QString().setNum(dialogLineIntersect->getP1Line2()));
SetAttribute(domElement, AttrP2Line2, QString().setNum(dialogLineIntersect->getP2Line2()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogLineIntersect.clear();

View file

@ -156,6 +156,7 @@ void VToolNormal::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogNormal->getFirstPointId()));
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogNormal->getSecondPointId()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogNormal.clear();

View file

@ -175,6 +175,7 @@ void VToolPointOfContact::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogPointOfContact->getFirstPoint()));
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogPointOfContact->getSecondPoint()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogPointOfContact.clear();

View file

@ -123,6 +123,7 @@ void VToolPointOfIntersection::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogPointOfIntersection->getFirstPointId()));
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogPointOfIntersection->getSecondPointId()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogPointOfIntersection.clear();

View file

@ -179,6 +179,7 @@ void VToolShoulderPoint::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrP2Line, QString().setNum(dialogShoulderPoint->getP2Line()));
SetAttribute(domElement, AttrPShoulder, QString().setNum(dialogShoulderPoint->getPShoulder()));
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogShoulderPoint.clear();

View file

@ -162,6 +162,7 @@ void VToolSinglePoint::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrY, QString().setNum(toMM(p.y())));
//I don't now why but signal does not work.
doc->FullUpdateTree();
emit toolhaveChange();
}
}
dialogSinglePoint.clear();

View file

@ -176,6 +176,7 @@ void VToolSpline::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrKAsm2, spl.GetKasm2());
SetAttribute(domElement, AttrKCurve, spl.GetKcurve());
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogSpline.clear();

View file

@ -160,6 +160,7 @@ void VToolSplinePath::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.getKCurve()));
UpdatePathPoint(domElement, splPath);
emit FullUpdateTree();
emit toolhaveChange();
}
}

View file

@ -178,6 +178,7 @@ void VToolTriangle::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTriangle->getFirstPointId()));
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTriangle->getSecondPointId()));
emit FullUpdateTree();
emit toolhaveChange();
}
}

View file

@ -76,6 +76,7 @@ VAbstractTool::VAbstractTool(VDomDocument *doc, VContainer *data, qint64 id, QOb
connect(this, &VAbstractTool::toolhaveChange, this->doc, &VDomDocument::haveLiteChange);
connect(this->doc, &VDomDocument::FullUpdateFromFile, this, &VAbstractTool::FullUpdateFromFile);
connect(this, &VAbstractTool::FullUpdateTree, this->doc, &VDomDocument::FullUpdateTree);
emit toolhaveChange();
}
void VAbstractTool::NewSceneRect(QGraphicsScene *sc, QGraphicsView *view)

View file

@ -198,6 +198,7 @@ void VToolDetail::FullUpdateFromGui(int result)
}
}
emit FullUpdateTree();
emit toolhaveChange();
}
}
dialogDetail.clear();

View file

@ -1342,7 +1342,6 @@ void VDomDocument::FullUpdateTree()
delete scene;
setCurrentData();
emit FullUpdateFromFile();
emit haveChange();
}
void VDomDocument::haveLiteChange()