refactor: adapt rest of the codebase to the new resource model
In order to access the ModFolderModel from the ModFolderPage, i created a new m_model for the correct type, shadowing the m_model of type ResourceFolderModel. This creates two shared_ptr references to the same object, but since they will have the same lifetime, it doesn't generate a memory leak. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
@ -261,6 +261,9 @@ void ResourceFolderModel::applyUpdates(QSet<QString>& current_set, QSet<QString>
|
||||
|
||||
std::sort(removed_rows.begin(), removed_rows.end());
|
||||
|
||||
for (int i = 0; i < removed_rows.size(); i++)
|
||||
removed_rows[i] -= i;
|
||||
|
||||
for (auto& removed_index : removed_rows) {
|
||||
beginRemoveRows(QModelIndex(), removed_index, removed_index);
|
||||
|
||||
|
Reference in New Issue
Block a user