added basic buggy text copying

This commit is contained in:
fourtf
2018-01-16 02:39:31 +01:00
parent a33ac76f99
commit 0ca916717c
6 changed files with 68 additions and 274 deletions
+10 -1
View File
@@ -54,7 +54,11 @@ ImageLayoutElement::ImageLayoutElement(MessageElement &_creator, Image &_image,
void ImageLayoutElement::addCopyTextToString(QString &str, int from, int to) const
{
str += "<image>";
str += this->image.getName();
if (this->hasTrailingSpace()) {
str += " ";
}
}
int ImageLayoutElement::getSelectionIndexCount()
@@ -117,6 +121,11 @@ TextLayoutElement::TextLayoutElement(MessageElement &_creator, QString &_text, Q
void TextLayoutElement::addCopyTextToString(QString &str, int from, int to) const
{
str += this->text.mid(from, to - from);
if (this->hasTrailingSpace()) {
str += " ";
}
}
int TextLayoutElement::getSelectionIndexCount()