[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Patch to fix multiple undo command on pasting page in kpresenter
From: Thorsten Zachmann <t.zachmann () zagge ! de>
Date: 2009-11-01 5:11:28
Message-ID: 200911010611.28570.t.zachmann () zagge ! de
[Download RAW message or body]
On Wed October 28 2009, Thorsten Zachmann wrote:
> If there are no objections I will apply the patch to trunk. For 2.1 I will
> come up with a different patch based on the begin/endMacro for kopageapp.
> This works but does not allow to have different command names which is
> why I would have preferred to fix the bug instead of working around it.
>
Can someone please review the attached patch to not create a lot of commands
while pasting a slide. I like to apply to koffice 2.1 branch to get this fixed
before 2.1 is released.
Thorsten
["dont_create_commands.diff" (text/x-patch)]
Index: KoPAPastePage.cpp
===================================================================
--- KoPAPastePage.cpp (revision 1042108)
+++ KoPAPastePage.cpp (working copy)
@@ -42,6 +42,12 @@ KoPAPastePage::KoPAPastePage( KoPADocume
bool KoPAPastePage::process( const KoXmlElement & body, KoOdfReadStore & odfStore )
{
+ if ( m_doc->pageType() == KoPageApp::Slide ) {
+ m_doc->beginMacro( i18n( "Paste Slides" ) );
+ }
+ else {
+ m_doc->beginMacro( i18n( "Paste Pages" ) );
+ }
KoOdfLoadingContext loadingContext( odfStore.styles(), odfStore.store(), m_doc->componentData() );
KoPALoadingContext paContext( loadingContext, m_doc->dataCenterMap() );
@@ -147,6 +153,7 @@ bool KoPAPastePage::process( const KoXml
}
m_doc->addCommand( cmd );
+ m_doc->endMacro();
return true;
}
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic