Amelioration du rendu dans l'editeur d'element lorsque le zoom est inferieur a 1:1.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@597 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2009-04-18 18:54:25 +00:00
parent 77672472ec
commit 2b9fa513fb
7 changed files with 21 additions and 13 deletions

View File

@@ -94,13 +94,12 @@ const QDomElement PartPolygon::toXml(QDomDocument &xml_document) const {
@param options Options pour affiner le rendu
@param widget Widget sur lequel le rendu est effectue
*/
void PartPolygon::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) {
void PartPolygon::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *) {
applyStylesToQPainter(*painter);
QPen t = painter -> pen();
if (isSelected()) {
t.setColor(Qt::red);
painter -> setPen(t);
}
t.setCosmetic(options && options -> levelOfDetail < 1.0);
if (isSelected()) t.setColor(Qt::red);
painter -> setPen(t);
if (closed) painter -> drawPolygon(polygon());
else painter -> drawPolyline(polygon());
}