mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Amelioration du rendu graphique lorsque le zoom est inferieur a 1.0.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@566 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -182,6 +182,9 @@ void Terminal::removeConductor(Conductor *f) {
|
||||
@param widget Le widget sur lequel on dessine
|
||||
*/
|
||||
void Terminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, QWidget *widget) {
|
||||
// en dessous d'un certain zoom, les bornes ne sont plus dessinees
|
||||
if (options && options -> levelOfDetail < 0.5) return;
|
||||
|
||||
p -> save();
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
@@ -219,6 +222,10 @@ void Terminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, QWidg
|
||||
QPen t;
|
||||
t.setWidthF(1.0);
|
||||
|
||||
if (options && options -> levelOfDetail < 1.0) {
|
||||
t.setCosmetic(true);
|
||||
}
|
||||
|
||||
// dessin de la borne en rouge
|
||||
t.setColor(Qt::red);
|
||||
p -> setPen(t);
|
||||
|
||||
Reference in New Issue
Block a user