diff --git a/limereport/items/lrchartitemeditor.cpp b/limereport/items/lrchartitemeditor.cpp index c609c46..b2f35cb 100644 --- a/limereport/items/lrchartitemeditor.cpp +++ b/limereport/items/lrchartitemeditor.cpp @@ -295,4 +295,15 @@ void ChartItemEditor::on_xAxisFieldComboBox_currentTextChanged(const QString &ar { if (!m_initing) m_charItem->setXAxisField(arg1); -} \ No newline at end of file +} +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); +} diff --git a/limereport/items/lrchartitemeditor.h b/limereport/items/lrchartitemeditor.h index 64e0549..7c72556 100644 --- a/limereport/items/lrchartitemeditor.h +++ b/limereport/items/lrchartitemeditor.h @@ -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();