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:
scorpio810
2015-11-19 15:19:45 +00:00
parent fbef0af8d3
commit 4d63289388
2 changed files with 4 additions and 40 deletions

View File

@@ -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