summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/TreeHeaderView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/TreeHeaderView.cpp')
-rw-r--r--src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/TreeHeaderView.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/TreeHeaderView.cpp b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/TreeHeaderView.cpp
index df784418..3efc033d 100644
--- a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/TreeHeaderView.cpp
+++ b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/TreeHeaderView.cpp
@@ -33,14 +33,15 @@ TreeHeaderView::TreeHeaderView(QWidget *parent)
{
}
-void TreeHeaderView::scrollContentsBy(int dx, int dy)
+/**
+ * Overridden to ignore scrolling after initial show related scrolling has been finished
+ *
+ * When RowTreeLabel (QGraphicsTextItem) gets focus for text editing, it forces views to scroll
+ * themselves so that editable text item is always visible. We don't want tree header view to move.
+ * @see QGraphicsTextItemPrivate::textControl() and _q_ensureVisible()
+ */
+void TreeHeaderView::scrollContentsBy(int dx, int dy)
{
- // Overridden to ignore scrolling after initial show related scrolling has been finished
- //
- // Longer explanation: When RowTreeLabelItem (QGraphicsTextItem) gets focus
- // for text editing, it forces views to scroll themselves so that editable
- // text item is always visible. But we don't want tree header view to move.
- // See QGraphicsTextItemPrivate::textControl() and _q_ensureVisible()
if (m_allowScrolling)
QGraphicsView::scrollContentsBy(dx, dy);
}