Don't know why i did this, but this code did not allow change valies of known

measurement in standard table.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-11-22 16:31:31 +02:00
parent 64df6d8095
commit 0a67af35b3

View File

@ -1485,23 +1485,16 @@ void TMainWindow::SaveMBaseValue(double value)
return; return;
} }
if (meash->IsCustom()) m->SetMBaseValue(nameField->data(Qt::UserRole).toString(), value);
{
m->SetMBaseValue(nameField->data(Qt::UserRole).toString(), value);
MeasurementsWasSaved(false); MeasurementsWasSaved(false);
RefreshData(); RefreshData();
search->RefreshList(ui->lineEditFind->text()); search->RefreshList(ui->lineEditFind->text());
ui->tableWidget->blockSignals(true); ui->tableWidget->blockSignals(true);
ui->tableWidget->selectRow(row); ui->tableWidget->selectRow(row);
ui->tableWidget->blockSignals(false); ui->tableWidget->blockSignals(false);
}
else
{
qCWarning(tMainWindow, "%s", qUtf8Printable(tr("The base value of known measurement forbidden to change.")));
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -1531,24 +1524,16 @@ void TMainWindow::SaveMSizeIncrease(double value)
return; return;
} }
if (meash->IsCustom()) m->SetMSizeIncrease(nameField->data(Qt::UserRole).toString(), value);
{
m->SetMSizeIncrease(nameField->data(Qt::UserRole).toString(), value);
MeasurementsWasSaved(false); MeasurementsWasSaved(false);
RefreshData(); RefreshData();
search->RefreshList(ui->lineEditFind->text()); search->RefreshList(ui->lineEditFind->text());
ui->tableWidget->blockSignals(true); ui->tableWidget->blockSignals(true);
ui->tableWidget->selectRow(row); ui->tableWidget->selectRow(row);
ui->tableWidget->blockSignals(false); ui->tableWidget->blockSignals(false);
}
else
{
qCWarning(tMainWindow, "%s",
qUtf8Printable(tr("The size increase value of known measurement forbidden to change.")));
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -1578,22 +1563,14 @@ void TMainWindow::SaveMHeightIncrease(double value)
return; return;
} }
if (meash->IsCustom()) m->SetMHeightIncrease(nameField->data(Qt::UserRole).toString(), value);
{
m->SetMHeightIncrease(nameField->data(Qt::UserRole).toString(), value);
MeasurementsWasSaved(false); MeasurementsWasSaved(false);
RefreshData(); RefreshData();
search->RefreshList(ui->lineEditFind->text()); search->RefreshList(ui->lineEditFind->text());
ui->tableWidget->selectRow(row); ui->tableWidget->selectRow(row);
}
else
{
qCWarning(tMainWindow, "%s",
qUtf8Printable(tr("The height increase value of known measurement forbidden to change.")));
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------