-----------------------------------------------------------------------------
| 14 | |
| 15 | //----------------------------------------------------------------------------- |
| 16 | void pqLinkedObjectPythonTextArea::link(pqLinkedObjectInterface* other) |
| 17 | { |
| 18 | if (other) |
| 19 | { |
| 20 | const QUndoStack& undoStack = this->TextArea.getUndoStack(); |
| 21 | this->ConnectedTo = other; |
| 22 | this->Connection = QObject::connect(&undoStack, &QUndoStack::indexChanged, |
| 23 | [this]() |
| 24 | { |
| 25 | if (!this->SettingText) |
| 26 | { |
| 27 | this->ConnectedTo->setText(this->getText()); |
| 28 | } |
| 29 | }); |
| 30 | } |
| 31 | } |
no test coverage detected