[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegames/kblackbox
From:       Nicolas Roffet <nicolas-kde () roffet ! com>
Date:       2007-07-01 21:01:34
Message-ID: 1183323694.497320.19920.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 682160 by roffet:

We don't need a static_cast here.

 M  +4 -5      kbbgraphicsitemblackbox.cpp  


--- trunk/KDE/kdegames/kblackbox/kbbgraphicsitemblackbox.cpp #682159:682160
@@ -27,9 +27,10 @@
  *   51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA               *
  ***************************************************************************/
 
-
 #include "kbbgraphicsitemblackbox.h"
 
+
+
 #include <QGraphicsScene>
 #include <QGraphicsSceneMouseEvent>
 #include <QGraphicsLineItem>
@@ -113,10 +114,8 @@
 
 void KBBGraphicsItemBlackBox::mousePressEvent (QGraphicsSceneMouseEvent* event)
 {
-	int x = (static_cast<int>(event->pos().x()) - \
                KBBScalableGraphicWidget::BORDER_SIZE);
-	int y = (static_cast<int>(event->pos().y()) - \
                KBBScalableGraphicWidget::BORDER_SIZE);
-	x /= KBBScalableGraphicWidget::RATIO;
-	y /= KBBScalableGraphicWidget::RATIO;
+	int x = (int)(event->pos().x() - \
KBBScalableGraphicWidget::BORDER_SIZE)/KBBScalableGraphicWidget::RATIO; +	int y = \
(int)(event->pos().y() - \
KBBScalableGraphicWidget::BORDER_SIZE)/KBBScalableGraphicWidget::RATIO;  
 	m_widget->mouseBoxClick(event->button(), x + y*m_columns);
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic