diff options
| author | Crystalwarrior <varsash@gmail.com> | 2020-04-01 20:01:00 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2020-04-01 20:01:00 +0300 |
| commit | 71ebdac1c1ac560d00a6d1f75ef9a45c5bc50b41 (patch) | |
| tree | 7a39dbd1ade858d9c848f211cb8f1ea888da8599 | |
| parent | c49c9cdd777c7df38594aa444a1aee8c8f9cf09c (diff) | |
Fix collapse all rightclick option being annoying in its behavior. Now it's *smart*!
| -rw-r--r-- | src/courtroom.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 26648372..d5dd6565 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -3917,6 +3917,10 @@ void Courtroom::music_list_expand_all() void Courtroom::music_list_collapse_all() { ui_music_list->collapseAll(); + QTreeWidgetItem *current = ui_music_list->selectedItems()[0]; + if (current->parent() != nullptr) + current = current->parent(); + ui_music_list->setCurrentItem(current); } void Courtroom::on_area_list_double_clicked(QTreeWidgetItem *p_item, int column) |
