Fix crash. Valentina crashes when change name of piece.
--HG-- branch : feature
This commit is contained in:
parent
c48dc6b4a2
commit
4cc232fc74
|
@ -69,6 +69,7 @@ DialogSeamAllowance::DialogSeamAllowance(const VContainer *data, const quint32 &
|
||||||
InitGrainlineTab();
|
InitGrainlineTab();
|
||||||
|
|
||||||
flagName = true;//We have default name of piece.
|
flagName = true;//We have default name of piece.
|
||||||
|
ChangeColor(ui->labelEditName, okColor);
|
||||||
flagError = MainPathIsValid();
|
flagError = MainPathIsValid();
|
||||||
CheckState();
|
CheckState();
|
||||||
|
|
||||||
|
@ -396,21 +397,20 @@ void DialogSeamAllowance::Remove()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSeamAllowance::NameDetailChanged()
|
void DialogSeamAllowance::NameDetailChanged()
|
||||||
{
|
{
|
||||||
SCASSERT(labelEditNamePoint != nullptr)
|
|
||||||
QLineEdit* edit = qobject_cast<QLineEdit*>(sender());
|
QLineEdit* edit = qobject_cast<QLineEdit*>(sender());
|
||||||
if (edit)
|
if (edit)
|
||||||
{
|
{
|
||||||
if (edit->text().isEmpty())
|
if (edit->text().isEmpty())
|
||||||
{
|
{
|
||||||
flagName = false;
|
flagName = false;
|
||||||
ChangeColor(labelEditNamePoint, Qt::red);
|
ChangeColor(ui->labelEditName, Qt::red);
|
||||||
QIcon icon(":/icons/win.icon.theme/16x16/status/dialog-warning.png");
|
QIcon icon(":/icons/win.icon.theme/16x16/status/dialog-warning.png");
|
||||||
ui->tabWidget->setTabIcon(1, icon);
|
ui->tabWidget->setTabIcon(1, icon);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flagName = true;
|
flagName = true;
|
||||||
ChangeColor(labelEditNamePoint, okColor);
|
ChangeColor(ui->labelEditName, okColor);
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
ui->tabWidget->setTabIcon(1, icon);
|
ui->tabWidget->setTabIcon(1, icon);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user