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()