Fix tooltip not showing in EmotePopup (#2046)

* Fix tooltip not showing in `EmotePopup`

* Update CHANGELOG.md
This commit is contained in:
fanway 2020-10-09 18:21:04 +03:00 committed by GitHub
parent 2fe8a9079a
commit df97d609a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View file

@ -24,6 +24,7 @@
- Bugfix: Starting Chatterino in a minimized state after an update will no longer cause a crash - Bugfix: Starting Chatterino in a minimized state after an update will no longer cause a crash
- Bugfix: Modify the emote parsing to handle some edge-cases with dots and stuff (#1704, #1714) - Bugfix: Modify the emote parsing to handle some edge-cases with dots and stuff (#1704, #1714)
- Bugfix: Fixed timestamps being incorrect on some messages loaded from the recent-messages service on startup (#1286, #2020) - Bugfix: Fixed timestamps being incorrect on some messages loaded from the recent-messages service on startup (#1286, #2020)
- Bugfix: Fixed tooltip didn't show in `EmotePopup` depending on the `Link preview` setting enabled or no (#2008)
## 2.2.0 ## 2.2.0

View file

@ -1273,12 +1273,11 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
const auto &tooltip = hoverLayoutElement->getCreator().getTooltip(); const auto &tooltip = hoverLayoutElement->getCreator().getTooltip();
bool isLinkValid = hoverLayoutElement->getLink().isValid(); bool isLinkValid = hoverLayoutElement->getLink().isValid();
auto emoteElement =
dynamic_cast<const EmoteElement *>(&hoverLayoutElement->getCreator());
if (tooltip.isEmpty()) if (tooltip.isEmpty() || (isLinkValid && emoteElement == nullptr &&
{ !getSettings()->linkInfoTooltip))
tooltipWidget->hide();
}
else if (isLinkValid && !getSettings()->linkInfoTooltip)
{ {
tooltipWidget->hide(); tooltipWidget->hide();
} }
@ -1286,8 +1285,6 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
{ {
auto &tooltipPreviewImage = TooltipPreviewImage::instance(); auto &tooltipPreviewImage = TooltipPreviewImage::instance();
tooltipPreviewImage.setImageScale(0, 0); tooltipPreviewImage.setImageScale(0, 0);
auto emoteElement = dynamic_cast<const EmoteElement *>(
&hoverLayoutElement->getCreator());
auto badgeElement = dynamic_cast<const BadgeElement *>( auto badgeElement = dynamic_cast<const BadgeElement *>(
&hoverLayoutElement->getCreator()); &hoverLayoutElement->getCreator());