summary refs log tree commit diff
path: root/src/timeline/widgets
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-04-27 22:15:44 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-04-27 22:15:44 +0300
commit3f80725c33c3c491bb6c186a46f20272bb2dfc46 (patch)
tree00fc4206178bacb9c4a40f6a0521842f194d8d69 /src/timeline/widgets
parentAdd remove_if for maps (diff)
downloadnheko-3f80725c33c3c491bb6c186a46f20272bb2dfc46.tar.xz
Add support for displaying m.sticker events
fixes #291
Diffstat (limited to 'src/timeline/widgets')
-rw-r--r--src/timeline/widgets/ImageItem.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/timeline/widgets/ImageItem.cc b/src/timeline/widgets/ImageItem.cc

index 3aae63c8..03f9741b 100644 --- a/src/timeline/widgets/ImageItem.cc +++ b/src/timeline/widgets/ImageItem.cc
@@ -138,6 +138,11 @@ ImageItem::setImage(const QPixmap &image) void ImageItem::mousePressEvent(QMouseEvent *event) { + if (!isInteractive_) { + event->accept(); + return; + } + if (event->button() != Qt::LeftButton) return; @@ -204,7 +209,7 @@ ImageItem::paintEvent(QPaintEvent *event) painter.drawPath(path); // Bottom text section - if (underMouse()) { + if (isInteractive_ && underMouse()) { const int textBoxHeight = fontHeight / 2 + 6; textRegion_ = QRectF(0, height_ - textBoxHeight, width_, textBoxHeight);