QPlainTextEdit widget crash a dialog if do not disable signal when closing a

dialog.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-01-31 14:27:13 +02:00
parent 67c2dd6514
commit 21e034ef71
4 changed files with 22 additions and 0 deletions

View File

@ -201,6 +201,15 @@ void DialogPiecePath::ShowVisualization()
} }
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogPiecePath::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormulaWidth->blockSignals(true);
ui->plainTextEditFormulaWidthBefore->blockSignals(true);
ui->plainTextEditFormulaWidthAfter->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogPiecePath::ShowContextMenu(const QPoint &pos) void DialogPiecePath::ShowContextMenu(const QPoint &pos)
{ {

View File

@ -65,6 +65,7 @@ protected:
virtual void SaveData() Q_DECL_OVERRIDE; virtual void SaveData() Q_DECL_OVERRIDE;
virtual void CheckState() Q_DECL_OVERRIDE; virtual void CheckState() Q_DECL_OVERRIDE;
virtual void ShowVisualization() Q_DECL_OVERRIDE; virtual void ShowVisualization() Q_DECL_OVERRIDE;
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
private slots: private slots:
void ShowContextMenu(const QPoint &pos); void ShowContextMenu(const QPoint &pos);

View File

@ -304,6 +304,17 @@ void DialogSeamAllowance::CheckState()
} }
} }
//---------------------------------------------------------------------------------------------------------------------
void DialogSeamAllowance::closeEvent(QCloseEvent *event)
{
ui->plainTextEditFormulaWidth->blockSignals(true);
ui->plainTextEditFormulaWidthBefore->blockSignals(true);
ui->plainTextEditFormulaWidthAfter->blockSignals(true);
ui->lineEditRotFormula->blockSignals(true);
ui->lineEditLenFormula->blockSignals(true);
DialogTool::closeEvent(event);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogSeamAllowance::UpdateList() void DialogSeamAllowance::UpdateList()
{ {

View File

@ -63,6 +63,7 @@ protected:
/** @brief SaveData Put dialog data in local variables */ /** @brief SaveData Put dialog data in local variables */
virtual void SaveData() Q_DECL_OVERRIDE; virtual void SaveData() Q_DECL_OVERRIDE;
virtual void CheckState() Q_DECL_OVERRIDE; virtual void CheckState() Q_DECL_OVERRIDE;
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
protected slots: protected slots:
void UpdateList(); void UpdateList();