Refactoring, removed unused code.
(grafted from 47cdd2849e84f9c1a4897d032259af6216e14e7e) --HG-- branch : release
This commit is contained in:
parent
94cfe7c5d3
commit
82c5c048bf
|
@ -1509,22 +1509,6 @@ void TMainWindow::SaveMBaseValue(double value)
|
|||
}
|
||||
|
||||
const QTableWidgetItem *nameField = ui->tableWidget->item(ui->tableWidget->currentRow(), ColumnName);
|
||||
|
||||
QSharedPointer<VMeasurement> meash;
|
||||
|
||||
try
|
||||
{
|
||||
// Translate to internal look.
|
||||
meash = data->GetVariable<VMeasurement>(nameField->data(Qt::UserRole).toString());
|
||||
}
|
||||
catch(const VExceptionBadId &e)
|
||||
{
|
||||
qCWarning(tMainWindow, "%s\n\n%s\n\n%s",
|
||||
qUtf8Printable(tr("Can't find measurement '%1'.").arg(nameField->text())),
|
||||
qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation()));
|
||||
return;
|
||||
}
|
||||
|
||||
m->SetMBaseValue(nameField->data(Qt::UserRole).toString(), value);
|
||||
|
||||
MeasurementsWasSaved(false);
|
||||
|
@ -1550,22 +1534,6 @@ void TMainWindow::SaveMSizeIncrease(double value)
|
|||
}
|
||||
|
||||
const QTableWidgetItem *nameField = ui->tableWidget->item(ui->tableWidget->currentRow(), ColumnName);
|
||||
|
||||
QSharedPointer<VMeasurement> meash;
|
||||
|
||||
try
|
||||
{
|
||||
// Translate to internal look.
|
||||
meash = data->GetVariable<VMeasurement>(nameField->data(Qt::UserRole).toString());
|
||||
}
|
||||
catch(const VExceptionBadId &e)
|
||||
{
|
||||
qCWarning(tMainWindow, "%s\n\n%s\n\n%s",
|
||||
qUtf8Printable(tr("Can't find measurement '%1'.").arg(nameField->text())),
|
||||
qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation()));
|
||||
return;
|
||||
}
|
||||
|
||||
m->SetMSizeIncrease(nameField->data(Qt::UserRole).toString(), value);
|
||||
|
||||
MeasurementsWasSaved(false);
|
||||
|
@ -1591,22 +1559,6 @@ void TMainWindow::SaveMHeightIncrease(double value)
|
|||
}
|
||||
|
||||
const QTableWidgetItem *nameField = ui->tableWidget->item(ui->tableWidget->currentRow(), ColumnName);
|
||||
|
||||
QSharedPointer<VMeasurement> meash;
|
||||
|
||||
try
|
||||
{
|
||||
// Translate to internal look.
|
||||
meash = data->GetVariable<VMeasurement>(nameField->data(Qt::UserRole).toString());
|
||||
}
|
||||
catch(const VExceptionBadId &e)
|
||||
{
|
||||
qCWarning(tMainWindow, "%s\n\n%s\n\n%s",
|
||||
qUtf8Printable(tr("Can't find measurement '%1'.").arg(nameField->text())),
|
||||
qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation()));
|
||||
return;
|
||||
}
|
||||
|
||||
m->SetMHeightIncrease(nameField->data(Qt::UserRole).toString(), value);
|
||||
|
||||
MeasurementsWasSaved(false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user