fix last active index
This commit is contained in:
parent
81dfce3898
commit
39564ed708
1 changed files with 8 additions and 5 deletions
|
|
@ -117,6 +117,7 @@ Item {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.preferredWidth: 82 * DefaultStyle.dp
|
Layout.preferredWidth: 82 * DefaultStyle.dp
|
||||||
defaultAccount: accountProxy.defaultAccount
|
defaultAccount: accountProxy.defaultAccount
|
||||||
|
currentIndex: 0
|
||||||
Binding on currentIndex {
|
Binding on currentIndex {
|
||||||
when: mainItem.contextualMenuOpenedComponent != undefined
|
when: mainItem.contextualMenuOpenedComponent != undefined
|
||||||
value: -1
|
value: -1
|
||||||
|
|
@ -489,13 +490,15 @@ Item {
|
||||||
currentIndex: -1
|
currentIndex: -1
|
||||||
onActiveFocusChanged: if(activeFocus && currentIndex >= 0) children[currentIndex].forceActiveFocus()
|
onActiveFocusChanged: if(activeFocus && currentIndex >= 0) children[currentIndex].forceActiveFocus()
|
||||||
on_CurrentIndexChanged:{
|
on_CurrentIndexChanged:{
|
||||||
if(count > 0 && _currentIndex >= count && tabbar.model[_currentIndex].link){
|
if (count > 0) {
|
||||||
|
if(_currentIndex >= count && tabbar.model[_currentIndex].link){
|
||||||
Qt.openUrlExternally(tabbar.model[_currentIndex].link)
|
Qt.openUrlExternally(tabbar.model[_currentIndex].link)
|
||||||
}else {
|
}else if (_currentIndex >= 0){
|
||||||
currentIndex = _currentIndex
|
currentIndex = _currentIndex
|
||||||
SettingsCpp.setLastActiveTabIndex(currentIndex)
|
SettingsCpp.setLastActiveTabIndex(currentIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
CallPage {
|
CallPage {
|
||||||
id: callPage
|
id: callPage
|
||||||
Connections {
|
Connections {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue