diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-07 21:57:47 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-10 10:27:30 +0100 |
| commit | c06d28e3a388d53543897c7fcafe3ed3507dce78 (patch) | |
| tree | c9a0efa4fe684251360d70a57c56f4d9690f1888 /src/moapplication.cpp | |
| parent | 7d9fa5e4f96840321ff996b4c637b7cd686c3570 (diff) | |
Tentative fix for drop indicator appearance at the top of the mod list.
Diffstat (limited to 'src/moapplication.cpp')
| -rw-r--r-- | src/moapplication.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/moapplication.cpp b/src/moapplication.cpp index 709bcbda..9de54f2f 100644 --- a/src/moapplication.cpp +++ b/src/moapplication.cpp @@ -65,9 +65,19 @@ public: {
}
- void drawPrimitive(PrimitiveElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget) const {
+ void drawPrimitive(
+ PrimitiveElement element, const QStyleOption* option,
+ QPainter* painter, const QWidget* widget) const override
+ {
if (element == QStyle::PE_IndicatorItemViewItemDrop) {
+ // 0. Fix a bug that made the drop indicator sometimes appear on top
+ // of the mod list when selecting a mod.
+ if (option->rect.height() == 0
+ && option->rect.bottomRight() == QPoint(-1, -1)) {
+ return;
+ }
+
// 1. full-width drop indicator
QRect rect(option->rect);
if (auto* view = qobject_cast<const QTreeView*>(widget)) {
|
