Skip to content

Commit aeeb5fc

Browse files
committed
fix dbMarkerCategory parent resolution
Signed-off-by: osamahammad21 <[email protected]>
1 parent ddfe04a commit aeeb5fc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/gui/src/dbDescriptors.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4431,9 +4431,11 @@ Descriptor::Properties DbMarkerCategoryDescriptor::getDBProperties(
44314431

44324432
odb::dbObject* parent = category->getParent();
44334433
if (parent != top) {
4434-
if (parent->getObjectType() == odb::dbObjectType::dbBlockObj) {
4434+
if (parent->getObjectType() == odb::dbObjectType::dbChipObj) {
4435+
// TODO: fix this
44354436
props.push_back(
4436-
{"Parent", gui->makeSelected(static_cast<odb::dbBlock*>(parent))});
4437+
{"Parent",
4438+
gui->makeSelected(static_cast<odb::dbChip*>(parent)->getBlock())});
44374439
} else {
44384440
props.push_back(
44394441
{"Parent",

src/odb/src/db/dbMarkerCategory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ _dbMarkerCategory::~_dbMarkerCategory()
145145

146146
bool _dbMarkerCategory::isTopCategory() const
147147
{
148-
return getOwner()->getObjectType() == dbBlockObj;
148+
return getOwner()->getObjectType() == dbChipObj;
149149
}
150150

151151
_dbBlock* _dbMarkerCategory::getBlock() const

0 commit comments

Comments
 (0)