mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-15 11:04:12 +02:00
Merge pull request #727 from zi-mozhuang/zh
Fix print window clipping diagram when titleblock on right edge is hidden.
Fixes a frequently made mistake: confusing width and height when rotating something... 😉
This commit is contained in:
@@ -454,8 +454,11 @@ QRect ProjectPrintWindow::diagramRect(Diagram *diagram, const ExportProperties &
|
||||
{
|
||||
auto diagram_rect = diagram->border_and_titleblock.borderAndTitleBlockRect();
|
||||
if (!option.draw_titleblock) {
|
||||
auto titleblock_height = diagram->border_and_titleblock.titleBlockRect().height();
|
||||
diagram_rect.setHeight(diagram_rect.height() - titleblock_height);
|
||||
auto titleblock_rect = diagram->border_and_titleblock.titleBlockRect();
|
||||
if (diagram->border_and_titleblock.titleBlockEdge() == Qt::BottomEdge)
|
||||
diagram_rect.setHeight(diagram_rect.height() - titleblock_rect.height());
|
||||
else
|
||||
diagram_rect.setWidth(diagram_rect.width() - titleblock_rect.width());
|
||||
}
|
||||
|
||||
//Adjust the border of diagram to 1px (width of the line)
|
||||
|
||||
Reference in New Issue
Block a user