mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Folio List:QET Crash on print corrected
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2849 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -34,6 +34,21 @@ DiagramFolioList::DiagramFolioList( QETProject *project, QObject *parent) : Diag
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
id = 0;
|
id = 0;
|
||||||
|
|
||||||
|
clear();
|
||||||
|
list_lines_.clear();
|
||||||
|
list_rectangles_.clear();
|
||||||
|
|
||||||
|
qreal width = border_and_titleblock.columnsTotalWidth();
|
||||||
|
qreal height = border_and_titleblock.rowsTotalHeight();
|
||||||
|
|
||||||
|
//top left corner of drawable area
|
||||||
|
qreal x0 = border_and_titleblock.rowsHeaderWidth();
|
||||||
|
qreal y0 = border_and_titleblock.columnsHeaderHeight();
|
||||||
|
QRectF row_RectBorder(x0, y0, width, height);
|
||||||
|
sheetRectangle = row_RectBorder;
|
||||||
|
|
||||||
|
buildGrid(row_RectBorder,30,2,colWidths);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -68,11 +83,6 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r)
|
|||||||
p -> drawRect(r);
|
p -> drawRect(r);
|
||||||
p -> setPen(Qt::black);
|
p -> setPen(Qt::black);
|
||||||
|
|
||||||
clear();
|
|
||||||
|
|
||||||
list_lines_.clear();
|
|
||||||
list_rectangles_.clear();
|
|
||||||
|
|
||||||
qreal width = border_and_titleblock.columnsTotalWidth();
|
qreal width = border_and_titleblock.columnsTotalWidth();
|
||||||
qreal height = border_and_titleblock.rowsTotalHeight();
|
qreal height = border_and_titleblock.rowsTotalHeight();
|
||||||
|
|
||||||
@@ -81,7 +91,14 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r)
|
|||||||
qreal y0 = border_and_titleblock.columnsHeaderHeight();
|
qreal y0 = border_and_titleblock.columnsHeaderHeight();
|
||||||
QRectF row_RectBorder(x0, y0, width, height);
|
QRectF row_RectBorder(x0, y0, width, height);
|
||||||
|
|
||||||
buildGrid(row_RectBorder,30,2,colWidths);
|
// If the sheet size has changed since last paint, then clear the scene and re-draw the grid.
|
||||||
|
if (sheetRectangle != row_RectBorder) {
|
||||||
|
sheetRectangle = row_RectBorder;
|
||||||
|
clear();
|
||||||
|
list_lines_.clear();
|
||||||
|
list_rectangles_.clear();
|
||||||
|
buildGrid(row_RectBorder,30,2,colWidths);
|
||||||
|
}
|
||||||
|
|
||||||
x0 = list_rectangles_[0] -> topLeft().x();
|
x0 = list_rectangles_[0] -> topLeft().x();
|
||||||
y0 = list_rectangles_[0] -> topLeft().y();
|
y0 = list_rectangles_[0] -> topLeft().y();
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ class DiagramFolioList : public Diagram
|
|||||||
|
|
||||||
QList<QLineF *> list_lines_;
|
QList<QLineF *> list_lines_;
|
||||||
QList<QRectF *> list_rectangles_;
|
QList<QRectF *> list_rectangles_;
|
||||||
|
QRectF sheetRectangle;
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user