Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/models/itemarrangementproxymodel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -489,10 +489,14 @@ void ItemArrangementProxyModel::removeFolder(const QString &idNumber)
QString fullId("internal/folders/" + idNumber);
Q_ASSERT(m_folders.contains(fullId));

m_folders.remove(fullId);
auto *page = m_folders.take(fullId);
page->disconnect(this);

m_topLevel->removeItem(fullId);
QList<QStandardItem*> result = m_folderModel.findItems(fullId);
m_folderModel.removeRows(result.first()->row(), 1);

m_folders.remove(fullId);
}

// get folder by id. 0 is top level, >=1 is folder
Expand Down