diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8b322cb5..2a03f48c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
### Fixed
- Fix some minor visual issues with the various zoom sliders.
+- Smooth out scrolling when mouse is over tile/metatile images.
- Fix the Tileset Editor selectors getting extra white space when changing tilesets.
- Fix a crash when adding disabled events with the Pencil tool.
diff --git a/forms/mainwindow.ui b/forms/mainwindow.ui
index 45316d33..d1ef7767 100644
--- a/forms/mainwindow.ui
+++ b/forms/mainwindow.ui
@@ -803,7 +803,7 @@
-
-
+
0
@@ -922,7 +922,7 @@
-
-
+
0
@@ -1032,7 +1032,7 @@
-
-
+
true
@@ -1227,7 +1227,7 @@
-
-
+
0
@@ -3435,6 +3435,11 @@
QWidget
+
+ NoScrollGraphicsView
+ QGraphicsView
+
+
diff --git a/forms/tileseteditor.ui b/forms/tileseteditor.ui
index 0e70da25..c144e5f2 100644
--- a/forms/tileseteditor.ui
+++ b/forms/tileseteditor.ui
@@ -86,7 +86,7 @@
6
-
-
+
Qt::ScrollBarAlwaysOff
@@ -560,7 +560,7 @@
0
-
-
+
Qt::ScrollBarAlwaysOff
@@ -806,6 +806,11 @@
QComboBox
+
+ NoScrollGraphicsView
+ QGraphicsView
+
+
diff --git a/include/ui/graphicsview.h b/include/ui/graphicsview.h
index cee19293..c0d1592c 100644
--- a/include/ui/graphicsview.h
+++ b/include/ui/graphicsview.h
@@ -4,12 +4,23 @@
#include
#include
-class ClickableGraphicsView : public QGraphicsView
+class NoScrollGraphicsView : public QGraphicsView
{
Q_OBJECT
public:
- ClickableGraphicsView() : QGraphicsView() {}
- ClickableGraphicsView(QWidget *parent) : QGraphicsView(parent) {}
+ NoScrollGraphicsView(QWidget *parent = nullptr) : QGraphicsView(parent) {}
+
+protected:
+ void wheelEvent(QWheelEvent *event) {
+ event->ignore();
+ }
+};
+
+class ClickableGraphicsView : public NoScrollGraphicsView
+{
+ Q_OBJECT
+public:
+ ClickableGraphicsView(QWidget *parent = nullptr) : NoScrollGraphicsView(parent) {}
public:
void mouseReleaseEvent(QMouseEvent *event) override {