summaryrefslogtreecommitdiffabout
path: root/kaddressbook/undocmds.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/undocmds.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/undocmds.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp
index 5fbeec3..5807dc0 100644
--- a/kaddressbook/undocmds.cpp
+++ b/kaddressbook/undocmds.cpp
@@ -35,9 +35,9 @@
#include "addresseeconfig.h"
#include "kabcore.h"
#include "undocmds.h"
-
+extern bool pasteWithNewUid;
/////////////////////////////////
// PwDelete Methods
PwDeleteCommand::PwDeleteCommand(KABC::AddressBook *doc,
@@ -111,9 +111,10 @@ void PwPasteCommand::redo()
for ( it = mAddresseeList.begin(); it != mAddresseeList.end(); ++it ) {
/* we have to set a new uid for the contact, otherwise insertAddressee()
ignore it.
*/
- (*it).setUid( KApplication::randomString( 10 ) );
+ if ( pasteWithNewUid )
+ (*it).setUid( KApplication::randomString( 10 ) );
uids.append( (*it).uid() );
mCore->addressBook()->insertAddressee( *it );
}
if ( uids.count() < 4 ) {