re-enable link resolver, but fix the underlying issue in the "link changed" signal.
The feature itself still doesn't work for me, but this code does the same thing. only thing that's really different is it also disconnects the signal properly once the TextLayoutElement is deleted
This commit is contained in:
@@ -181,6 +181,17 @@ TextLayoutElement::TextLayoutElement(MessageElement &_creator, QString &_text,
|
||||
this->setText(_text);
|
||||
}
|
||||
|
||||
void TextLayoutElement::listenToLinkChanges()
|
||||
{
|
||||
this->managedConnections_.emplace_back(
|
||||
static_cast<TextElement &>(this->getCreator())
|
||||
.linkChanged.connect([this]() {
|
||||
// log("Old link: {}", this->getCreator().getLink().value);
|
||||
// log("This link: {}", this->getLink().value);
|
||||
this->setLink(this->getCreator().getLink()); //
|
||||
}));
|
||||
}
|
||||
|
||||
void TextLayoutElement::addCopyTextToString(QString &str, int from,
|
||||
int to) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user