@@ -1012,25 +1012,22 @@ void MemWatchModel::updateStructAddresses(MemWatchTreeNode* node)
1012
1012
1013
1013
StructDef* def = m_structDefMap[node->getEntry ()->getStructName ()];
1014
1014
1015
- if (def->getFields ().count () != node->getChildren ().count ())
1015
+ if (node->isExpanded ())
1016
+ updateStructNode (node);
1017
+ else if (!node->getEntry ()->hasAddressChanged ())
1018
+ return ;
1019
+ else
1016
1020
{
1017
- if (node->isExpanded ())
1018
- updateStructNode (node);
1019
- else if (!node->getEntry ()->hasAddressChanged ())
1020
- return ;
1021
- else
1022
- {
1023
- u32 addr = node->getEntry ()->getActualAddress ();
1024
- node->getEntry ()->updateActualAddress (addr);
1025
- QVector<FieldDef*> fields = def->getFields ();
1026
- QVector<MemWatchTreeNode*> children = node->getChildren ();
1021
+ u32 addr = node->getEntry ()->getActualAddress ();
1022
+ node->getEntry ()->updateActualAddress (addr);
1023
+ QVector<FieldDef*> fields = def->getFields ();
1024
+ QVector<MemWatchTreeNode*> children = node->getChildren ();
1027
1025
1028
- for (int i = 0 ; i < children.count (); ++i)
1029
- {
1030
- children[i]->getEntry ()->setConsoleAddress (addr + fields[i]->getOffset ());
1031
- if (GUICommon::isContainerType (children[i]->getEntry ()->getType ()))
1032
- updateContainerAddresses (children[i]);
1033
- }
1026
+ for (int i = 0 ; i < children.count (); ++i)
1027
+ {
1028
+ children[i]->getEntry ()->setConsoleAddress (addr + fields[i]->getOffset ());
1029
+ if (GUICommon::isContainerType (children[i]->getEntry ()->getType ()))
1030
+ updateContainerAddresses (children[i]);
1034
1031
}
1035
1032
}
1036
1033
}
0 commit comments