Account for bottom annotations on final row in hex viewier
This commit is contained in:
@@ -168,15 +168,16 @@ void ByteItemGraphicsScene::adjustSize(bool forced) {
|
|||||||
this->adjustByteItemPositions();
|
this->adjustByteItemPositions();
|
||||||
this->adjustAnnotationItemPositions();
|
this->adjustAnnotationItemPositions();
|
||||||
|
|
||||||
const auto lastByteItemPosition = (--this->byteItemsByAddress.end())->second->pos();
|
const auto* lastByteItem = (--this->byteItemsByAddress.end())->second;
|
||||||
|
const auto sceneHeight = static_cast<int>(
|
||||||
|
lastByteItem->pos().y() + ByteItem::HEIGHT + AnnotationItem::BOTTOM_HEIGHT + this->margins.bottom()
|
||||||
|
);
|
||||||
|
|
||||||
this->setSceneRect(
|
this->setSceneRect(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
width,
|
width,
|
||||||
std::max(
|
std::max(sceneHeight, this->parent->height())
|
||||||
static_cast<int>(lastByteItemPosition.y() + ByteItem::HEIGHT + this->margins.bottom()),
|
|
||||||
this->parent->height()
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user