mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 10:30:53 +01:00
Clean some code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4269 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -93,24 +93,9 @@ void Element::displayHelpLine(bool b)
|
||||
* @param options
|
||||
* @param widget
|
||||
*/
|
||||
void Element::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget)
|
||||
void Element::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *)
|
||||
{
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
//Fix visual bug on QGraphicsScene that occur only on X11 with default zoom.
|
||||
QSettings settings;
|
||||
static bool must_correct_rendering_bug = settings.value("correct-rendering", false).toBool();
|
||||
if (must_correct_rendering_bug) {
|
||||
Diagram *dia = diagram();
|
||||
if (dia && options -> levelOfDetail == 1.0 && widget) {
|
||||
// calcule la rotation qu'a subi l'element
|
||||
qreal applied_rotation = 90.0 * orientation();
|
||||
if (applied_rotation == 90.0) painter -> translate(1.0, -1.0);
|
||||
else if (applied_rotation == 180.0) painter -> translate(-1.0, -1.0);
|
||||
else if (applied_rotation == 270.0) painter -> translate(-1.0, 1.0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (must_highlight_) drawHighlight(painter, options);
|
||||
|
||||
//Draw the element himself
|
||||
|
||||
Reference in New Issue
Block a user