| @@ -594,8 +594,14 @@ void ListBox::updateContent() | |||||
| viewport->updateVisibleArea (isVisible()); | viewport->updateVisibleArea (isVisible()); | ||||
| viewport->resized(); | viewport->resized(); | ||||
| if (selectionChanged && model != nullptr) | |||||
| model->selectedRowsChanged (lastRowSelected); | |||||
| if (selectionChanged) | |||||
| { | |||||
| if (model != nullptr) | |||||
| model->selectedRowsChanged (lastRowSelected); | |||||
| if (auto* handler = getAccessibilityHandler()) | |||||
| handler->notifyAccessibilityEvent (AccessibilityEvent::rowSelectionChanged); | |||||
| } | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -630,6 +636,9 @@ void ListBox::selectRowInternal (const int row, | |||||
| lastRowSelected = row; | lastRowSelected = row; | ||||
| model->selectedRowsChanged (row); | model->selectedRowsChanged (row); | ||||
| if (auto* handler = getAccessibilityHandler()) | |||||
| handler->notifyAccessibilityEvent (AccessibilityEvent::rowSelectionChanged); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| @@ -650,6 +659,9 @@ void ListBox::deselectRow (const int row) | |||||
| viewport->updateContents(); | viewport->updateContents(); | ||||
| model->selectedRowsChanged (lastRowSelected); | model->selectedRowsChanged (lastRowSelected); | ||||
| if (auto* handler = getAccessibilityHandler()) | |||||
| handler->notifyAccessibilityEvent (AccessibilityEvent::rowSelectionChanged); | |||||
| } | } | ||||
| } | } | ||||
| @@ -666,6 +678,9 @@ void ListBox::setSelectedRows (const SparseSet<int>& setOfRowsToBeSelected, | |||||
| if (model != nullptr && sendNotificationEventToModel == sendNotification) | if (model != nullptr && sendNotificationEventToModel == sendNotification) | ||||
| model->selectedRowsChanged (lastRowSelected); | model->selectedRowsChanged (lastRowSelected); | ||||
| if (auto* handler = getAccessibilityHandler()) | |||||
| handler->notifyAccessibilityEvent (AccessibilityEvent::rowSelectionChanged); | |||||
| } | } | ||||
| SparseSet<int> ListBox::getSelectedRows() const | SparseSet<int> ListBox::getSelectedRows() const | ||||
| @@ -709,6 +724,9 @@ void ListBox::deselectAllRows() | |||||
| if (model != nullptr) | if (model != nullptr) | ||||
| model->selectedRowsChanged (lastRowSelected); | model->selectedRowsChanged (lastRowSelected); | ||||
| if (auto* handler = getAccessibilityHandler()) | |||||
| handler->notifyAccessibilityEvent (AccessibilityEvent::rowSelectionChanged); | |||||
| } | } | ||||
| } | } | ||||