mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 03:27:40 +01:00
Ooops, perhaps the code to stop devices from auto-expanding would work better in the DeviceView class.
This commit is contained in:
parent
ae1fa10d44
commit
8c0b17c000
@ -407,3 +407,8 @@ void DeviceView::DeleteFinished(const SongList& songs_with_errors) {
|
||||
dialog->Show(OrganiseErrorDialog::Type_Delete, songs_with_errors);
|
||||
// It deletes itself when the user closes it
|
||||
}
|
||||
|
||||
bool DeviceView::CanRecursivelyExpand(const QModelIndex& index) const {
|
||||
// Never expand devices
|
||||
return index.parent().isValid();
|
||||
}
|
||||
|
@ -77,6 +77,9 @@ private slots:
|
||||
|
||||
void DeleteFinished(const SongList& songs_with_errors);
|
||||
|
||||
// AutoExpandingTreeView
|
||||
bool CanRecursivelyExpand(const QModelIndex& index) const;
|
||||
|
||||
private:
|
||||
QModelIndex MapToDevice(const QModelIndex& merged_model_index) const;
|
||||
QModelIndex MapToLibrary(const QModelIndex& merged_model_index) const;
|
||||
|
@ -354,8 +354,3 @@ void LibraryView::FilterReturnPressed() {
|
||||
|
||||
emit doubleClicked(currentIndex());
|
||||
}
|
||||
|
||||
bool LibraryView::CanRecursivelyExpand(const QModelIndex& index) const {
|
||||
// Never expand devices
|
||||
return index.parent().isValid();
|
||||
}
|
||||
|
@ -72,9 +72,6 @@ class LibraryView : public AutoExpandingTreeView {
|
||||
void contextMenuEvent(QContextMenuEvent* e);
|
||||
void keyReleaseEvent(QKeyEvent* e);
|
||||
|
||||
// AutoExpandingTreeView
|
||||
bool CanRecursivelyExpand(const QModelIndex& index) const;
|
||||
|
||||
private slots:
|
||||
void Load();
|
||||
void AddToPlaylist();
|
||||
|
Loading…
x
Reference in New Issue
Block a user