Fix bug. Valentina doesn't update piece label.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-08-23 15:26:48 +03:00
parent db8b4e0023
commit af6e41d8cc
4 changed files with 6 additions and 2 deletions

View File

@ -219,6 +219,7 @@ void DialogPatternProperties::Apply()
case 3:
SaveLabelData();
SaveTemplateData();
emit doc->UpdatePatternLabel();
break;
default:
break;
@ -235,6 +236,8 @@ void DialogPatternProperties::Ok()
SaveLabelData();
SaveTemplateData();
emit doc->UpdatePatternLabel();
close();
}
@ -546,7 +549,6 @@ void DialogPatternProperties::SaveDescription()
descriptionChanged = false;
emit doc->patternChanged(false);
emit doc->UpdatePatternLabel();
}
}

View File

@ -1625,6 +1625,7 @@ void MainWindow::UnloadMeasurements()
}
qApp->setPatternType(MeasurementsType::Unknown);
doc->SetMPath(QString());
emit doc->UpdatePatternLabel();
PatternChangesWereSaved(false);
ui->actionEditCurrent->setEnabled(false);
ui->actionUnloadMeasurements->setDisabled(true);
@ -3419,6 +3420,7 @@ bool MainWindow::SavePattern(const QString &fileName, QString &error)
else
{
doc->SetMPath(mPath);
emit doc->UpdatePatternLabel();
qCDebug(vMainWindow, "Could not save file %s. %s.", qUtf8Printable(fileName), qUtf8Printable(error));
}
return result;

View File

@ -797,7 +797,6 @@ void VAbstractPattern::SetMPath(const QString &path)
if (setTagText(TagMeasurements, path))
{
emit patternChanged(false);
emit UpdatePatternLabel();
}
else
{

View File

@ -1148,6 +1148,7 @@ VToolSeamAllowance::VToolSeamAllowance(VAbstractPattern *doc, VContainer *data,
connect(m_grainLine, &VGrainlineItem::SignalRotated, this, &VToolSeamAllowance::SaveRotateGrainline);
connect(doc, &VAbstractPattern::UpdatePatternLabel, this, &VToolSeamAllowance::UpdatePatternInfo);
connect(doc, &VAbstractPattern::UpdatePatternLabel, this, &VToolSeamAllowance::UpdateDetailLabel);
connect(doc, &VAbstractPattern::CheckLayout, this, &VToolSeamAllowance::UpdateDetailLabel);
connect(doc, &VAbstractPattern::CheckLayout, this, &VToolSeamAllowance::UpdatePatternInfo);
connect(doc, &VAbstractPattern::CheckLayout, this, &VToolSeamAllowance::UpdateGrainline);