From bff2731a7ea315d9968e6b2ea8893aa31e3e846b Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 1 Aug 2015 13:33:57 +0300 Subject: [PATCH] Enough just update. --HG-- branch : feature --- src/app/tape/tmainwindow.cpp | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index 75ff34338..29bcde66a 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -667,36 +667,11 @@ void TMainWindow::AddCustom() else { currentRow = ui->tableWidget->currentRow()+1; - ui->tableWidget->insertRow( currentRow ); QTableWidgetItem *nameField = ui->tableWidget->item(ui->tableWidget->currentRow(), 0); m->AddEmptyAfter(nameField->text(), name); } - VMeasurement *meash; - if (mType == MeasurementsType::Standard) - { - meash = new VMeasurement(currentRow, name, m->BaseSize(), m->BaseHeight(), 0, 0, 0); - } - else - { - meash = new VMeasurement(data, currentRow, name, 0, "0", true); - } - data->AddVariable(name, meash); - - if (mType == MeasurementsType::Individual) - { - AddCell(name, currentRow, 0); // name - AddCell("0", currentRow, 1); // calculated value - AddCell("0", currentRow, 2); // formula - } - else - { - AddCell(name, currentRow, 0); // name - AddCell("0", currentRow, 1); // calculated value - AddCell("0", currentRow, 3); // base value - AddCell("0", currentRow, 4); // in sizes - AddCell("0", currentRow, 5); // in heights - } + RefreshData(); ui->tableWidget->blockSignals(false); ui->tableWidget->selectRow(currentRow);