[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: [Patch] kpresenter: copy & paste more than one object
From: Laurent Montel <lmontel () mandrakesoft ! com>
Date: 2002-03-20 15:05:40
[Download RAW message or body]
Le Wednesday 20 March 2002 14:48, Thorsten Zachmann a écrit :
> Hello all
>
> Another patch for kpresenter. When selecting more than 1 object and copy
> and paste them, only the last one is moved by 20,20 and is selected. I
> think all the objects that are pasted in should be moved and selected.
> The following patch makes this possible. Please tell me what you think
> about it. If it is ok I can commit it.
>
> Thorsten
>
>
> Index: kprpage.cc
> ===================================================================
> RCS file: /home/kde/koffice/kpresenter/kprpage.cc,v
> retrieving revision 1.103
> diff -u -3 -p -r1.103 kprpage.cc
> --- kprpage.cc 2002/03/19 10:41:51 1.103
> +++ kprpage.cc 2002/03/20 04:58:25
> @@ -171,12 +171,17 @@ void KPrPage::copyObjs(QDomDocument &doc
> void KPrPage::pasteObjs( const QByteArray & data )
> {
> m_doc->deSelectAllObj();
> + int num = m_objectList.count();
> QString clip_str = QString::fromUtf8( data );
> if ( clip_str.isEmpty() ) return;
> m_doc->loadPastedObjs( clip_str,this );
> - m_objectList.last()->moveBy( 20,20 );
> - m_objectList.last()->setSelected( true );
> - m_doc->repaint(m_objectList.last());
> + //move and select all new pasted in objects
> + KPObject *_tempObj;
> + for (_tempObj = m_objectList.at(num); _tempObj; _tempObj =
> m_objectList.next()) {
> + _tempObj->moveBy( 20,20 );
> + _tempObj->setSelected( true );
> + m_doc->repaint(_tempObj);
> + }
> m_doc->setModified(true);
> }
For me it's good.
Thanks
you can commit.
Regards.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic