summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2018-09-06 12:49:02 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2018-09-06 09:53:19 +0000
commitf54e41870176edf0b47c380fc5facd71fcf3b947 (patch)
tree2809b1a1f2fe321ecad6b48e7e5a9f3c72f50c57 /src/Authoring/Studio/Palettes
parent9afb5c5f8878cff5de2e9aab4492e228c4020809 (diff)
Fix incorrect paint on Timeline header
Fix an incorrect thin lines that appear on the top left of the timeline palette when running the application then opening a project, then opening the timeline data input dialog then click an empty area of the timeline. Task-number: QT3DS-1923 Change-Id: I3ab4fc677aeecf4c5cd5d6a61f5a4a447f52536f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes')
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/SelectionRect.cpp5
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/SelectionRect.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/SelectionRect.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/SelectionRect.cpp
index f04165e8..429b0170 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/SelectionRect.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/SelectionRect.cpp
@@ -51,7 +51,8 @@ void SelectionRect::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt
void SelectionRect::start(const QPointF &origin)
{
m_rect.setTopLeft(origin);
-
+ m_rect.setWidth(0);
+ m_rect.setHeight(0);
m_active = true;
}
@@ -77,7 +78,7 @@ void SelectionRect::end()
m_active = false;
}
-bool SelectionRect::isActive()
+bool SelectionRect::isActive() const
{
return m_active;
}
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/SelectionRect.h b/src/Authoring/Studio/Palettes/TimelineGraphicsView/SelectionRect.h
index cad62662..224284c0 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/SelectionRect.h
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/SelectionRect.h
@@ -39,7 +39,7 @@ public:
void start(const QPointF &origin);
void updateSize(const QPointF &pos, const QRectF &visibleScene);
void end();
- bool isActive();
+ bool isActive() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget = nullptr) override;