This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GUITable selection issues with trees
- setOpenedTrees(): this internal function was calling setSelected() to update m_selected. Since setSelected() calls autoScroll(), this caused the scrollbar to scroll back to the selected row in some cases when that shouldn't be done. For example, clicking the "+" to open a tree caused autoscroll. Fix this by making setOpenedTrees() modify m_selected directly. - setDynamicData(): set scrollbar position after calling setSelected(), not before. This avoids setSelected()'s autoscroll messing up the scrollbar position again. - setSelected(): If an invisible row is selected, open all parents of the selected row in order to make the selected row visible. This fixes the issue where all the trees are closed again whenever you return from the setting edit dialog to the settings tab.
- Loading branch information
Showing 1 changed file with 30 additions and 9 deletions.