mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fixes empty tooltips showing
This commit is contained in:
parent
776a975624
commit
8dc4f8945e
|
@ -163,6 +163,8 @@ MessagePtr TwitchMessageBuilder::parse()
|
||||||
|
|
||||||
Link link;
|
Link link;
|
||||||
|
|
||||||
|
qDebug() << linkString;
|
||||||
|
|
||||||
if (linkString.isEmpty()) {
|
if (linkString.isEmpty()) {
|
||||||
link = Link();
|
link = Link();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -632,9 +632,13 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
|
||||||
}
|
}
|
||||||
const auto &tooltip = hoverLayoutElement->getCreator().getTooltip();
|
const auto &tooltip = hoverLayoutElement->getCreator().getTooltip();
|
||||||
|
|
||||||
|
if (tooltip.isEmpty()) {
|
||||||
|
tooltipWidget->hide();
|
||||||
|
} else {
|
||||||
tooltipWidget->moveTo(event->globalPos());
|
tooltipWidget->moveTo(event->globalPos());
|
||||||
tooltipWidget->setText(tooltip);
|
tooltipWidget->setText(tooltip);
|
||||||
tooltipWidget->show();
|
tooltipWidget->show();
|
||||||
|
}
|
||||||
|
|
||||||
// check if word has a link
|
// check if word has a link
|
||||||
if (hoverLayoutElement->getCreator().getLink().isValid()) {
|
if (hoverLayoutElement->getCreator().getLink().isValid()) {
|
||||||
|
|
Loading…
Reference in a new issue