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

List:       kmail-devel
Subject:    Re: kpresenter patch
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2002-07-24 11:19:57
[Download RAW message or body]

On Wednesday 24 July 2002 13:18, Thorsten Zachmann wrote:
> Hello all
>
> The is a small problem updating the sidebar. If a object is e.g. moved it
> is on the top (only on object selected).
> Now when the sidebar is updated it is also on the top even when it should
> be under an other object.
>
> The attached patch fixes this problem.
>
> What do you think about it?
>
> Is it ok to commit?
>
> Thorsten

Sorry. Forgot the patch. 

Here it is :-)

Thorsten
["sidebar9.diff" (text/x-diff)]

Index: kprcanvas.cc
===================================================================
RCS file: /home/kde/koffice/kpresenter/kprcanvas.cc,v
retrieving revision 1.295
diff -u -3 -p -r1.295 kprcanvas.cc
--- kprcanvas.cc	2002/07/23 10:05:30	1.295
+++ kprcanvas.cc	2002/07/24 11:13:26
@@ -3368,7 +3368,19 @@ void KPrCanvas::drawPageInPix( QPixmap &
     drawBackground( &p, _pix.rect() );
 
     //objects in current page
-    drawAllObjectsInPage( &p, m_view->kPresenterDoc()->pageList().at( currPresPage-1 \
)->objectList() ); +    QPtrList<KPObject> _list = \
m_view->kPresenterDoc()->pageList().at( currPresPage-1 )->objectList(); +
+    // check if object is selected, if so put it on the right place for the output
+    if( _list.count() > 1 && (int)_list.count() > selectedObjectPosition && \
selectedObjectPosition >= 0) { +        _list.setAutoDelete( false );
+        KPObject *kpobject = _list.last();
+        if ( kpobject->isSelected() ) {
+            _list.take( _list.count() - 1 );
+            _list.insert( selectedObjectPosition, kpobject );
+        }
+    }
+
+    drawAllObjectsInPage( &p, _list );
 
     //draw sticky object
     //the numbers for the sticky page have to be recalculated


_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

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

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