This commit is contained in:
zi-mozhuang
2026-08-12 15:13:52 +08:00
parent 6f66745ce3
commit 1684d2cfe6
2 changed files with 7 additions and 9 deletions
+5 -6
View File
@@ -450,14 +450,13 @@ QRect ProjectPrintWindow::diagramRect(Diagram *diagram, const ExportProperties &
{
auto diagram_rect = diagram->border_and_titleblock.borderAndTitleBlockRect();
if (!option.draw_titleblock) {
auto tbt_rect = diagram->border_and_titleblock.titleBlockRect();
if (diagram->border_and_titleblock.titleBlockEdge() == Qt::BottomEdge)
diagram_rect.setHeight(diagram_rect.height() - tbt_rect.height());
else
diagram_rect.setWidth(diagram_rect.width() - tbt_rect.width());
auto tbt_rect = diagram->border_and_titleblock.titleBlockRect();
if (diagram->border_and_titleblock.titleBlockEdge() == Qt::BottomEdge)
diagram_rect.setHeight(diagram_rect.height() - tbt_rect.height());
else
diagram_rect.setWidth(diagram_rect.width() - tbt_rect.width());
}
//Adjust the border of diagram to 1px (width of the line)
diagram_rect.adjust(0,0,1,1);