mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-05 21:53:28 +01:00
parent
14dd723e3a
commit
fe26c8bb8f
@ -121,12 +121,14 @@ void SimpleTreeItem<T>::DeleteNotify(int child_row) {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void SimpleTreeItem<T>::ClearNotify() {
|
void SimpleTreeItem<T>::ClearNotify() {
|
||||||
model->BeginDelete(static_cast<T*>(this), 0, children.count()-1);
|
if (children.count()) {
|
||||||
|
model->BeginDelete(static_cast<T*>(this), 0, children.count() - 1);
|
||||||
|
|
||||||
qDeleteAll(children);
|
qDeleteAll(children);
|
||||||
children.clear();
|
children.clear();
|
||||||
|
|
||||||
model->EndDelete();
|
model->EndDelete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user