From 48fcc54aeb07c4b55e06fd60b852ff350cd17587 Mon Sep 17 00:00:00 2001 From: Amandeep Singh Date: Fri, 10 Aug 2012 20:31:06 +0530 Subject: [PATCH] Adding calls to updateAccessibility Items location changes when scrollbar is moved in dolphin. Accordingly calls to updateAccessibility should be made. --- src/kitemviews/kitemlistcontainer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/kitemviews/kitemlistcontainer.cpp b/src/kitemviews/kitemlistcontainer.cpp index 7d7ccb4d8..56438d732 100644 --- a/src/kitemviews/kitemlistcontainer.cpp +++ b/src/kitemviews/kitemlistcontainer.cpp @@ -164,6 +164,8 @@ void KItemListContainer::keyPressEvent(QKeyEvent* event) if (view) { QApplication::sendEvent(view, event); } + QAccessible::updateAccessibility(view, m_controller->selectionManager()->currentItem()+1, QAccessible::Focus); + QAccessible::updateAccessibility(view, m_controller->selectionManager()->currentItem()+1, QAccessible::LocationChanged); } void KItemListContainer::showEvent(QShowEvent* event) @@ -182,7 +184,8 @@ void KItemListContainer::scrollContentsBy(int dx, int dy) { m_horizontalSmoothScroller->scrollContentsBy(dx); m_verticalSmoothScroller->scrollContentsBy(dy); - //QAccessible::updateAccessibility(view(), , ); + QAccessible::updateAccessibility(m_controller->view(), m_controller->selectionManager()->currentItem()+1, QAccessible::Focus); + QAccessible::updateAccessibility(m_controller->view(), m_controller->selectionManager()->currentItem()+1, QAccessible::LocationChanged); } void KItemListContainer::wheelEvent(QWheelEvent* event) @@ -371,7 +374,8 @@ void KItemListContainer::updateGeometries() updateScrollOffsetScrollBar(); updateItemOffsetScrollBar(); QAccessible::updateAccessibility(m_controller->view(), 0, QAccessible::LocationChanged); - QAccessible::updateAccessibility(m_controller->view(), m_controller->selectionManager()->currentItem(), QAccessible::LocationChanged); + QAccessible::updateAccessibility(m_controller->view(), m_controller->selectionManager()->currentItem()+1, QAccessible::LocationChanged); + QAccessible::updateAccessibility(m_controller->view(), m_controller->selectionManager()->currentItem()+1, QAccessible::Focus); } } -- 2.47.3