mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix emote copying (#687)
* Fix emote copying * Fix (i.e. no longer add) blank spaces instead of badges I.e. badges' names do not get copied
This commit is contained in:
parent
ce155299e9
commit
113cfd69b0
|
@ -1,6 +1,7 @@
|
|||
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "messages/Emote.hpp"
|
||||
#include "messages/Image.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
#include "singletons/Theme.hpp"
|
||||
|
@ -77,13 +78,14 @@ ImageLayoutElement::ImageLayoutElement(MessageElement &creator, ImagePtr image,
|
|||
void ImageLayoutElement::addCopyTextToString(QString &str, int from,
|
||||
int to) const
|
||||
{
|
||||
// str += this->image_->getCopyString();
|
||||
str += "not implemented";
|
||||
|
||||
const auto *emoteElement = dynamic_cast<EmoteElement *>(&this->getCreator());
|
||||
if (emoteElement) {
|
||||
str += emoteElement->getEmote()->getCopyString();
|
||||
if (this->hasTrailingSpace()) {
|
||||
str += " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int ImageLayoutElement::getSelectionIndexCount()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue