Fixed app crash.

--HG--
branch : develop
This commit is contained in:
dismine 2014-11-22 20:37:59 +02:00
parent 85f8035b26
commit c0dba11baf
27 changed files with 109 additions and 2 deletions

View File

@ -190,6 +190,13 @@ void DialogAlongLine::SaveData()
line->RefreshGeometry(); line->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogAlongLine::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief setSecondPointId set id second point of line * @brief setSecondPointId set id second point of line

View File

@ -78,6 +78,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogAlongLine) Q_DISABLE_COPY(DialogAlongLine)

View File

@ -240,6 +240,15 @@ void DialogArc::SaveData()
path->RefreshGeometry(); path->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogArc::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
ui->plainTextEditF1->blockSignals(true);
ui->plainTextEditF2->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief ValChenged show description angles of lines * @brief ValChenged show description angles of lines

View File

@ -83,6 +83,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogArc) Q_DISABLE_COPY(DialogArc)

View File

@ -287,3 +287,10 @@ void DialogBisector::SaveData()
line->setLineStyle(VAbstractTool::LineStyle(typeLine)); line->setLineStyle(VAbstractTool::LineStyle(typeLine));
line->RefreshGeometry(); line->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogBisector::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}

View File

@ -83,6 +83,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogBisector) Q_DISABLE_COPY(DialogBisector)

View File

@ -269,3 +269,10 @@ void DialogCurveIntersectAxis::SaveData()
line->setLineStyle(VAbstractTool::LineStyle(typeLine)); line->setLineStyle(VAbstractTool::LineStyle(typeLine));
line->RefreshGeometry(); line->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogCurveIntersectAxis::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}

View File

@ -73,6 +73,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogCurveIntersectAxis) Q_DISABLE_COPY(DialogCurveIntersectAxis)
Ui::DialogCurveIntersectAxis *ui; Ui::DialogCurveIntersectAxis *ui;

View File

@ -137,6 +137,13 @@ void DialogCutArc::SaveData()
path->RefreshGeometry(); path->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogCutArc::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief setArcId set id of arc * @brief setArcId set id of arc

View File

@ -73,6 +73,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogCutArc) Q_DISABLE_COPY(DialogCutArc)
/** @brief ui keeps information about user interface */ /** @brief ui keeps information about user interface */

View File

@ -152,6 +152,13 @@ void DialogCutSpline::SaveData()
path->RefreshGeometry(); path->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogCutSpline::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogCutSpline::DeployFormulaTextEdit() void DialogCutSpline::DeployFormulaTextEdit()
{ {

View File

@ -68,6 +68,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogCutSpline) Q_DISABLE_COPY(DialogCutSpline)

View File

@ -152,6 +152,13 @@ void DialogCutSplinePath::SaveData()
path->RefreshGeometry(); path->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogCutSplinePath::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogCutSplinePath::DeployFormulaTextEdit() void DialogCutSplinePath::DeployFormulaTextEdit()
{ {

View File

@ -68,6 +68,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogCutSplinePath) Q_DISABLE_COPY(DialogCutSplinePath)

View File

@ -113,6 +113,13 @@ void DialogEditWrongFormula::CheckState()
bOk->setEnabled(flagFormula); bOk->setEnabled(flagFormula);
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogEditWrongFormula::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogEditWrongFormula::setFormula(const QString &value) void DialogEditWrongFormula::setFormula(const QString &value)
{ {

View File

@ -65,6 +65,7 @@ public slots:
virtual void EvalFormula(); virtual void EvalFormula();
protected: protected:
virtual void CheckState(); virtual void CheckState();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogEditWrongFormula) Q_DISABLE_COPY(DialogEditWrongFormula)
Ui::DialogEditWrongFormula *ui; Ui::DialogEditWrongFormula *ui;

View File

@ -1,4 +1,4 @@
/************************************************************************ /************************************************************************
** **
** @file dialogendline.cpp ** @file dialogendline.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com> ** @author Roman Telezhynskyi <dismine(at)gmail.com>
@ -291,6 +291,14 @@ void DialogEndLine::SaveData()
line->RefreshGeometry(); line->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogEndLine::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
ui->plainTextEditAngle->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
DialogEndLine::~DialogEndLine() DialogEndLine::~DialogEndLine()
{ {

View File

@ -83,6 +83,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogEndLine) Q_DISABLE_COPY(DialogEndLine)

View File

@ -336,3 +336,10 @@ void DialogLineIntersectAxis::SaveData()
line->setLineStyle(VAbstractTool::LineStyle(typeLine)); line->setLineStyle(VAbstractTool::LineStyle(typeLine));
line->RefreshGeometry(); line->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogLineIntersectAxis::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}

View File

@ -77,6 +77,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogLineIntersectAxis) Q_DISABLE_COPY(DialogLineIntersectAxis)
Ui::DialogLineIntersectAxis *ui; Ui::DialogLineIntersectAxis *ui;

View File

@ -184,6 +184,13 @@ void DialogNormal::SaveData()
line->RefreshGeometry(); line->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogNormal::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief setSecondPointId set id of second point * @brief setSecondPointId set id of second point

View File

@ -82,6 +82,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogNormal) Q_DISABLE_COPY(DialogNormal)

View File

@ -225,6 +225,13 @@ void DialogPointOfContact::SaveData()
line->RefreshGeometry(); line->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogPointOfContact::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief setSecondPoint set id second point * @brief setSecondPoint set id second point

View File

@ -80,6 +80,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogPointOfContact) Q_DISABLE_COPY(DialogPointOfContact)

View File

@ -213,6 +213,13 @@ void DialogShoulderPoint::SaveData()
line->RefreshGeometry(); line->RefreshGeometry();
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogShoulderPoint::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormula->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
/** /**
* @brief setPShoulder set id shoulder point * @brief setPShoulder set id shoulder point

View File

@ -82,6 +82,7 @@ protected:
* @brief SaveData Put dialog data in local variables * @brief SaveData Put dialog data in local variables
*/ */
virtual void SaveData(); virtual void SaveData();
virtual void closeEvent(QCloseEvent *event);
private: private:
Q_DISABLE_COPY(DialogShoulderPoint) Q_DISABLE_COPY(DialogShoulderPoint)

View File

@ -87,7 +87,7 @@ DialogTool::~DialogTool()
*/ */
void DialogTool::closeEvent(QCloseEvent *event) void DialogTool::closeEvent(QCloseEvent *event)
{ {
DialogClosed(QDialog::Rejected); DialogRejected();
event->accept(); event->accept();
} }