mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
VerticalTabs: Corectly recognize tree collapse / expand button
Summary: In treeview when the tab has no children the collapse / expand button is not visible but the control logic still thought that is is. By clicking on place where this button normaly is nothing happens and user has to click again somewhere else to change the selected tab. Test Plan: In treeview mode check the function of collapse / expand button when visible and invisible. - Visible: Expand / collapse the tree - Not visible: Select tab Reviewers: #falkon, drosca Reviewed By: #falkon, drosca Subscribers: falkon Tags: #falkon Differential Revision: https://phabricator.kde.org/D21304
This commit is contained in:
parent
bb8a3a799f
commit
fb09c266a7
|
@ -358,7 +358,9 @@ void TabTreeView::initView()
|
|||
TabTreeView::DelegateButton TabTreeView::buttonAt(const QPoint &pos, const QModelIndex &index) const
|
||||
{
|
||||
if (m_delegate->expandButtonRect(index).contains(pos)) {
|
||||
return ExpandButton;
|
||||
if (model()->rowCount(index) > 0) {
|
||||
return ExpandButton;
|
||||
}
|
||||
} else if (m_delegate->audioButtonRect(index).contains(pos)) {
|
||||
return AudioButton;
|
||||
} else if (m_delegate->closeButtonRect(index).contains(pos)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user