Fixed issue #492. Valentina crashes when add an increment.
--HG-- branch : release
This commit is contained in:
parent
643c60cc70
commit
b3bef6655d
|
@ -3,6 +3,7 @@
|
||||||
- [#473] Tape 'Preferences' cause loss of focus.
|
- [#473] Tape 'Preferences' cause loss of focus.
|
||||||
- [#485] Error when drawing a curved path.
|
- [#485] Error when drawing a curved path.
|
||||||
- [#491] Valentina doesn't update fractional separator.
|
- [#491] Valentina doesn't update fractional separator.
|
||||||
|
- [#492] Valentina crashes when add an increment.
|
||||||
|
|
||||||
# Version 0.4.4 April 12, 2016
|
# Version 0.4.4 April 12, 2016
|
||||||
- Updated measurement templates with all measurements. Added new template Aldrich/Women measurements.
|
- Updated measurement templates with all measurements. Added new template Aldrich/Women measurements.
|
||||||
|
|
|
@ -1004,6 +1004,9 @@ void TMainWindow::Fx()
|
||||||
|
|
||||||
if (dialog->exec() == QDialog::Accepted)
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
|
// Fix the bug #492. https://bitbucket.org/dismine/valentina/issues/492/valentina-crashes-when-add-an-increment
|
||||||
|
// Because of the bug need to take QTableWidgetItem twice time. Previous update "killed" the pointer.
|
||||||
|
const QTableWidgetItem *nameField = ui->tableWidget->item(row, ColumnName);
|
||||||
m->SetMValue(nameField->data(Qt::UserRole).toString(), dialog->GetFormula());
|
m->SetMValue(nameField->data(Qt::UserRole).toString(), dialog->GetFormula());
|
||||||
|
|
||||||
MeasurementsWasSaved(false);
|
MeasurementsWasSaved(false);
|
||||||
|
|
|
@ -704,6 +704,9 @@ void DialogIncrements::Fx()
|
||||||
|
|
||||||
if (dialog->exec() == QDialog::Accepted)
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
|
// Fix the bug #492. https://bitbucket.org/dismine/valentina/issues/492/valentina-crashes-when-add-an-increment
|
||||||
|
// Because of the bug need to take QTableWidgetItem twice time. Previous update "killed" the pointer.
|
||||||
|
const QTableWidgetItem *nameField = ui->tableWidgetIncrement->item(row, 0);
|
||||||
doc->SetIncrementFormula(nameField->text(), dialog->GetFormula());
|
doc->SetIncrementFormula(nameField->text(), dialog->GetFormula());
|
||||||
FullUpdateTree(Document::LiteParse);
|
FullUpdateTree(Document::LiteParse);
|
||||||
ui->tableWidgetIncrement->selectRow(row);
|
ui->tableWidgetIncrement->selectRow(row);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user