mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
If present, select first item in status dialog
The old behavior is confusing and there is no real reason to not have an object that is default-selected.
This commit is contained in:
parent
8fbc0e7c46
commit
b0801d469c
1 changed files with 5 additions and 1 deletions
|
@ -243,6 +243,10 @@ void StatusDialog::setFolderList( Folder::Map folders )
|
|||
qDebug() << "Folder: " << f;
|
||||
slotAddFolder( f );
|
||||
}
|
||||
|
||||
QModelIndex idx = _model->index(0, 0);
|
||||
if (idx.isValid())
|
||||
_folderList->setCurrentIndex(idx);
|
||||
buttonsSetEnabled();
|
||||
|
||||
}
|
||||
|
@ -270,7 +274,7 @@ void StatusDialog::buttonsSetEnabled()
|
|||
_ButtonAdd->setEnabled(true);
|
||||
}
|
||||
|
||||
QModelIndex selected = _folderList->selectionModel()->currentIndex();
|
||||
QModelIndex selected = _folderList->currentIndex();
|
||||
bool isSelected = selected.isValid();
|
||||
|
||||
_ButtonEnable->setEnabled(isSelected);
|
||||
|
|
Loading…
Reference in a new issue