Fix bug. Valentina doesn't update pattern label.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-08-23 20:54:20 +03:00
parent af6e41d8cc
commit 842dfafcd6
4 changed files with 15 additions and 1 deletions

View File

@ -474,6 +474,9 @@ bool MainWindow::LoadMeasurements(const QString &path)
{
VContainer::SetSize(UnitConvertor(m->BaseSize(), m->MUnit(), *m->GetData()->GetPatternUnit()));
VContainer::SetHeight(UnitConvertor(m->BaseHeight(), m->MUnit(), *m->GetData()->GetPatternUnit()));
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
else if (m->Type() == MeasurementsType::Individual)
{
@ -523,6 +526,9 @@ bool MainWindow::UpdateMeasurements(const QString &path, int size, int height)
{
VContainer::SetSize(size);
VContainer::SetHeight(height);
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
else if (m->Type() == MeasurementsType::Individual)
{
@ -3452,6 +3458,7 @@ void MainWindow::setCurrentFile(const QString &fileName)
{
qCDebug(vMainWindow, "Set current name to \"%s\"", qUtf8Printable(fileName));
qApp->SetPPath(fileName);
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
qApp->getUndoStack()->setClean();

View File

@ -1538,6 +1538,9 @@ void MainWindowsNoGUI::SetSizeHeightForIndividualM() const
{
VContainer::SetHeight(0);
}
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -797,6 +797,7 @@ void VAbstractPattern::SetMPath(const QString &path)
if (setTagText(TagMeasurements, path))
{
emit patternChanged(false);
patternLabelWasChanged = true;
}
else
{
@ -1282,6 +1283,7 @@ void VAbstractPattern::SetPatternName(const QString &qsName)
{
CheckTagExists(TagPatternName);
setTagText(TagPatternName, qsName);
patternLabelWasChanged = true;
modified = true;
emit patternChanged(false);
}
@ -1297,6 +1299,7 @@ void VAbstractPattern::SetCompanyName(const QString& qsName)
{
CheckTagExists(TagCompanyName);
setTagText(TagCompanyName, qsName);
patternLabelWasChanged = true;
modified = true;
emit patternChanged(false);
}
@ -1312,6 +1315,7 @@ void VAbstractPattern::SetPatternNumber(const QString& qsNum)
{
CheckTagExists(TagPatternNum);
setTagText(TagPatternNum, qsNum);
patternLabelWasChanged = true;
modified = true;
emit patternChanged(false);
}
@ -1327,6 +1331,7 @@ void VAbstractPattern::SetCustomerName(const QString& qsName)
{
CheckTagExists(TagCustomerName);
setTagText(TagCustomerName, qsName);
patternLabelWasChanged = true;
modified = true;
emit patternChanged(false);
}

View File

@ -162,7 +162,6 @@ inline void VAbstractApplication::SetPPath(const QString &value)
patternFilePath = value;
}
//---------------------------------------------------------------------------------------------------------------------
template <typename T>
inline QString VAbstractApplication::LocaleToString(const T &value)