Skip to content

Commit cbea060

Browse files
committed
gui: use odb::Rect method to simplify return statement
Signed-off-by: Arthur Koucher <[email protected]>
1 parent bdce6b8 commit cbea060

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/gui/src/dbDescriptors.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4685,16 +4685,14 @@ bool DbScanListDescriptor::getBBox(std::any object, odb::Rect& bbox) const
46854685
auto scan_list = getObject(object);
46864686
bbox.mergeInit();
46874687

4688-
bool has_placed_insts = false;
46894688
for (odb::dbScanInst* scan_inst : scan_list->getScanInsts()) {
46904689
odb::dbInst* inst = scan_inst->getInst();
46914690
if (inst->getPlacementStatus().isPlaced()) {
4692-
has_placed_insts = true;
46934691
bbox.merge(inst->getBBox()->getBox());
46944692
}
46954693
}
46964694

4697-
return has_placed_insts;
4695+
return !bbox.isInverted();
46984696
}
46994697

47004698
void DbScanListDescriptor::highlight(std::any object, Painter& painter) const

0 commit comments

Comments
 (0)