mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Fixes assert "can't have two CCached in the same object referring to the same value".
This commit is contained in:
committed by
Mathew Sutcliffe
parent
fa27b32984
commit
a6840f12a1
@@ -381,7 +381,7 @@ namespace BlackMisc
|
||||
|
||||
CValuePage &CValuePage::getPageFor(QObject *parent, CValueCache *cache)
|
||||
{
|
||||
auto pages = parent->findChildren<CValuePage *>();
|
||||
auto pages = parent->findChildren<CValuePage *>("", Qt::FindDirectChildrenOnly);
|
||||
auto it = std::find_if(pages.cbegin(), pages.cend(), [cache](CValuePage * page) { return page->m_cache == cache; });
|
||||
if (it == pages.cend()) { return *new CValuePage(parent, cache); }
|
||||
else { return **it; }
|
||||
|
||||
Reference in New Issue
Block a user