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

List:       kde-commits
Subject:    kdesdk/kompare/komparepart
From:       Otto Bruggeman <bruggie () home ! nl>
Date:       2004-01-01 22:52:07
Message-ID: 20040101225207.BB69D93FC () office ! kde ! org
[Download RAW message or body]

CVS commit by bruggie: 

Fix the --reverse problem in the connect widget, no review since this cant be any \
worse than what it was before :)

CCMAIL: 71509-done@bugs.kde.org


  M +14 -2     kompareconnectwidget.cpp   1.15


--- kdesdk/kompare/komparepart/kompareconnectwidget.cpp  #1.14:1.15
@@ -18,4 +18,5 @@
  ***************************************************************************/
 
+#include <qapplication.h>
 #include <qpainter.h>
 #include <qpixmap.h>
@@ -119,4 +120,7 @@ void KompareConnectWidget::paintEvent( Q
                              QPtrListIterator<Difference>( \
m_selectedModel->differences() );  diffIt += first;
+
+                        QRect leftRect, rightRect;
+
                         for( int i = first; diffIt.current() && i <= last; ++diffIt, \
++i )  {
@@ -124,6 +128,14 @@ void KompareConnectWidget::paintEvent( Q
                                 bool selected = (diff == m_selectedDifference);
 
-                                QRect leftRect = m_leftView->itemRect( i );
-                                QRect rightRect = m_rightView->itemRect( i );
+                                if ( QApplication::reverseLayout() )
+                                {
+                                        leftRect = m_rightView->itemRect( i );
+                                        rightRect = m_leftView->itemRect( i );
+                                }
+                                else
+                                {
+                                        leftRect = m_leftView->itemRect( i );
+                                        rightRect = m_rightView->itemRect( i );
+                                }
                                 int tl = leftRect.top();
                                 int tr = rightRect.top();


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

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