Fix changing name using table widget

This commit is contained in:
Emil Sawicki 2022-03-14 15:49:03 +01:00
parent 2ccb2faf18
commit 0d81e20772
2 changed files with 13 additions and 2 deletions

View File

@ -295,4 +295,15 @@ void ChartItemEditor::on_xAxisFieldComboBox_currentTextChanged(const QString &ar
{
if (!m_initing)
m_charItem->setXAxisField(arg1);
}
}
void ChartItemEditor::on_tableWidget_itemChanged(QTableWidgetItem *item)
{
if (ui->seriesNameLineEdit->hasFocus())
return;
const QString dataStr = item->data(Qt::DisplayRole).toString();
if (dataStr == ui->seriesNameLineEdit->text())
return;
ui->seriesNameLineEdit->setText(dataStr);
}

View File

@ -40,8 +40,8 @@ private slots:
void on_labelsFieldComboBox_currentTextChanged(const QString &arg1);
void slotChangeSeriesColor();
void on_seriesTypeComboBox_currentIndexChanged(const QString &arg1);
void on_xAxisFieldComboBox_currentTextChanged(const QString &arg1);
void on_tableWidget_itemChanged(QTableWidgetItem *item);
private:
void readSetting();