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. * @brief ChangedGrowth change new height value.
* @param text value height. * @param text value height.
*/ */
void ChangedGrowth(const QString & text); void ChangedHeight(const QString & text);
/** /**
* @brief ClosedActionTable actions after closing table with variables. * @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, AttrFirstPoint, dialogAlongLine->getFirstPointId());
SetAttribute(domElement, AttrSecondPoint, dialogAlongLine->getSecondPointId()); SetAttribute(domElement, AttrSecondPoint, dialogAlongLine->getSecondPointId());
emit FullUpdateTree(); emit FullUpdateTree();
emit toolhaveChange();
} }
} }
dialogAlongLine.clear(); dialogAlongLine.clear();

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -178,6 +178,7 @@ void VToolTriangle::FullUpdateFromGui(int result)
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTriangle->getFirstPointId())); SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTriangle->getFirstPointId()));
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTriangle->getSecondPointId())); SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTriangle->getSecondPointId()));
emit FullUpdateTree(); 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, &VAbstractTool::toolhaveChange, this->doc, &VDomDocument::haveLiteChange);
connect(this->doc, &VDomDocument::FullUpdateFromFile, this, &VAbstractTool::FullUpdateFromFile); connect(this->doc, &VDomDocument::FullUpdateFromFile, this, &VAbstractTool::FullUpdateFromFile);
connect(this, &VAbstractTool::FullUpdateTree, this->doc, &VDomDocument::FullUpdateTree); connect(this, &VAbstractTool::FullUpdateTree, this->doc, &VDomDocument::FullUpdateTree);
emit toolhaveChange();
} }
void VAbstractTool::NewSceneRect(QGraphicsScene *sc, QGraphicsView *view) void VAbstractTool::NewSceneRect(QGraphicsScene *sc, QGraphicsView *view)

View file

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

View file

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