Update SbieView.cpp

This commit is contained in:
okrc 2022-09-18 16:54:38 +08:00
parent 572fb7d3cf
commit 172e10a097
No known key found for this signature in database
GPG Key ID: 193B92A7166BB690
1 changed files with 3 additions and 3 deletions

View File

@ -704,9 +704,6 @@ void CSbieView::RenameGroup(const QString OldName, const QString NewName)
auto Group = m_Groups.take(OldName); auto Group = m_Groups.take(OldName);
m_Groups.insert(NewName, Group); m_Groups.insert(NewName, Group);
if (m_Collapsed.remove(OldName))
m_Collapsed.insert(NewName);
RenameItem(OldName, NewName); RenameItem(OldName, NewName);
} }
@ -716,6 +713,9 @@ void CSbieView::RenameItem(const QString OldName, const QString NewName)
theConf->DelValue("SizeCache/" + OldName); theConf->DelValue("SizeCache/" + OldName);
if(Size != -1) theConf->SetValue("SizeCache/" + NewName, Size); if(Size != -1) theConf->SetValue("SizeCache/" + NewName, Size);
if (m_Collapsed.remove(OldName))
m_Collapsed.insert(NewName);
for (auto I = m_Groups.begin(); I != m_Groups.end(); ++I) for (auto I = m_Groups.begin(); I != m_Groups.end(); ++I)
{ {
if (I.value().removeOne(OldName)) if (I.value().removeOne(OldName))