Fix issue with cursor position in tabs increments and preview calculations.
--HG-- branch : develop
This commit is contained in:
parent
37b4206793
commit
b693244847
|
@ -557,19 +557,21 @@ void DialogIncrements::LocalUpdateTree()
|
||||||
{
|
{
|
||||||
doc->LiteParseIncrements();
|
doc->LiteParseIncrements();
|
||||||
|
|
||||||
UpdateTree();
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogIncrements::UpdateTree()
|
|
||||||
{
|
|
||||||
int row = ui->tableWidgetIncrement->currentRow();
|
int row = ui->tableWidgetIncrement->currentRow();
|
||||||
|
|
||||||
FillIncrements();
|
FillIncrements();
|
||||||
|
|
||||||
|
ui->tableWidgetIncrement->blockSignals(true);
|
||||||
ui->tableWidgetIncrement->selectRow(row);
|
ui->tableWidgetIncrement->selectRow(row);
|
||||||
|
ui->tableWidgetIncrement->blockSignals(false);
|
||||||
|
|
||||||
row = ui->tableWidgetPC->currentRow();
|
row = ui->tableWidgetPC->currentRow();
|
||||||
|
|
||||||
FillPreviewCalculations();
|
FillPreviewCalculations();
|
||||||
|
|
||||||
|
ui->tableWidgetPC->blockSignals(true);
|
||||||
ui->tableWidgetPC->selectRow(row);
|
ui->tableWidgetPC->selectRow(row);
|
||||||
|
ui->tableWidgetPC->blockSignals(false);
|
||||||
|
|
||||||
search->RefreshList(ui->lineEditFind->text());
|
search->RefreshList(ui->lineEditFind->text());
|
||||||
searchPC->RefreshList(ui->lineEditFindPC->text());
|
searchPC->RefreshList(ui->lineEditFindPC->text());
|
||||||
|
@ -1209,7 +1211,7 @@ void DialogIncrements::Fx()
|
||||||
const QTableWidgetItem *nameField = table->item(row, 0);
|
const QTableWidgetItem *nameField = table->item(row, 0);
|
||||||
QSharedPointer<VIncrement> incr = data->GetVariable<VIncrement>(nameField->text());
|
QSharedPointer<VIncrement> incr = data->GetVariable<VIncrement>(nameField->text());
|
||||||
|
|
||||||
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(incr->GetData(), NULL_ID, this);
|
QScopedPointer<DialogEditWrongFormula> dialog(new DialogEditWrongFormula(incr->GetData(), NULL_ID, this));
|
||||||
dialog->setWindowTitle(tr("Edit increment"));
|
dialog->setWindowTitle(tr("Edit increment"));
|
||||||
dialog->SetFormula(qApp->TrVars()->TryFormulaFromUser(plainTextEditFormula->toPlainText().replace("\n", " "),
|
dialog->SetFormula(qApp->TrVars()->TryFormulaFromUser(plainTextEditFormula->toPlainText().replace("\n", " "),
|
||||||
qApp->Settings()->GetOsSeparator()));
|
qApp->Settings()->GetOsSeparator()));
|
||||||
|
@ -1228,7 +1230,6 @@ void DialogIncrements::Fx()
|
||||||
|
|
||||||
table->selectRow(row);
|
table->selectRow(row);
|
||||||
}
|
}
|
||||||
delete dialog;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -129,7 +129,6 @@ private:
|
||||||
void EnableDetails(QTableWidget *table, bool enabled);
|
void EnableDetails(QTableWidget *table, bool enabled);
|
||||||
|
|
||||||
void LocalUpdateTree();
|
void LocalUpdateTree();
|
||||||
void UpdateTree();
|
|
||||||
|
|
||||||
bool IncrementUsed(const QString &name) const;
|
bool IncrementUsed(const QString &name) const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user