| 334 | } |
| 335 | |
| 336 | void Histogram::handleAspectUpdated(const QString& aspectPath, const AbstractAspect* aspect) { |
| 337 | Q_D(Histogram); |
| 338 | const auto column = dynamic_cast<const AbstractColumn*>(aspect); |
| 339 | if (!column) |
| 340 | return; |
| 341 | |
| 342 | setUndoAware(false); |
| 343 | |
| 344 | if (d->dataColumn == column) // the column is the same and was just renamed -> update the column path |
| 345 | d->dataColumnPath = aspectPath; |
| 346 | else if (d->dataColumnPath == aspectPath) // another column was renamed to the current path -> set and connect to the new column |
| 347 | setDataColumn(column); |
| 348 | |
| 349 | if (d->value->column() == column) |
| 350 | d->value->setColumnPath(aspectPath); |
| 351 | else if (d->value->columnPath() == aspectPath) |
| 352 | d->value->setColumn(column); |
| 353 | |
| 354 | if (d->errorBar->yPlusColumn() == column) |
| 355 | d->errorBar->setYPlusColumnPath(aspectPath); |
| 356 | else if (d->errorBar->yPlusColumnPath() == aspectPath) |
| 357 | d->errorBar->setYPlusColumn(column); |
| 358 | |
| 359 | if (d->errorBar->yMinusColumn() == column) |
| 360 | d->errorBar->setYMinusColumnPath(aspectPath); |
| 361 | else if (d->errorBar->yMinusColumnPath() == aspectPath) |
| 362 | d->errorBar->setYMinusColumn(column); |
| 363 | |
| 364 | setUndoAware(true); |
| 365 | } |
| 366 | |
| 367 | QColor Histogram::color() const { |
| 368 | Q_D(const Histogram); |
nothing calls this directly
no test coverage detected