| 700 | }; |
| 701 | |
| 702 | void WorksheetElement::setCoordinateSystemIndex(int index, QUndoCommand* parent) { |
| 703 | if (index != m_cSystemIndex) { |
| 704 | auto* command = new SetCoordinateSystemIndexCmd(this, index, parent); |
| 705 | if (!parent) |
| 706 | exec(command); |
| 707 | } else if (!cSystem) { |
| 708 | // during load the index will be set, |
| 709 | // but the element might not have yet a plot assigned |
| 710 | if (plot()) |
| 711 | cSystem = dynamic_cast<const CartesianCoordinateSystem*>(plot()->coordinateSystem(index)); |
| 712 | retransform(); |
| 713 | } |
| 714 | } |
| 715 | |
| 716 | int WorksheetElement::coordinateSystemCount() const { |
| 717 | Q_D(const WorksheetElement); |