# HG changeset patch
# User insilmaril
# Date 1239007211 0
# Node ID a1f609eae872ff5c56103c7dee32535624221929
# Parent  4f305c07dd7c4f4b93ff206c8b2804e214936e6c
Bugfix für mod mode copy

diff -r 4f305c07dd7c -r a1f609eae872 mapeditor.cpp
--- a/mapeditor.cpp	Thu Apr 02 09:57:36 2009 +0000
+++ b/mapeditor.cpp	Mon Apr 06 08:40:11 2009 +0000
@@ -4631,8 +4631,25 @@
 	{
 		if (mainWindow->getModMode()==Main::ModModeColor)
 		{
-				pickingColor=true;
-				setCursor (PickColorCursor);
+			pickingColor=true;
+			setCursor (PickColorCursor);
+			return;
+		} 
+		if (mainWindow->getModMode()==Main::ModModeCopy)
+		{	
+			if (lmo && (typeid(*lmo)==typeid(BranchObj) ||
+				typeid(*lmo)==typeid(MapCenterObj) ))
+			{
+
+				selectInt (lmo);
+				copy();
+				if (lmo->getDepth()>0) select (lmo->getParObj() );
+				paste();
+				cout << "sel 1="<<getSelectedBranch()->getHeading().toStdString()<<endl;
+				lmo=getSelectedBranch()->getLastBranch();
+				cout << "sel 2="<<getSelectedBranch()->getHeading().toStdString()<<endl;
+				setCursor (Qt::ArrowCursor);
+			} else	
 				return;
 		} 
 		if (mainWindow->getModMode()==Main::ModModeXLink)
@@ -4677,6 +4694,7 @@
 
 			// If modMode==copy, then we want to "move" the _new_ object around
 			// then we need the offset from p to the _old_ selection, because of tmp
+			/*
 			if (mainWindow->getModMode()==Main::ModModeCopy &&
 				e->state() & Qt::ControlModifier)
 			{
@@ -4690,6 +4708,7 @@
 					model->reposition();
 				}
 			} 
+			*/
 
 			movingObj=xelection.single();	
 		} else
diff -r 4f305c07dd7c -r a1f609eae872 tex/vym.changelog
--- a/tex/vym.changelog	Thu Apr 02 09:57:36 2009 +0000
+++ b/tex/vym.changelog	Mon Apr 06 08:40:11 2009 +0000
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Mon Apr  6 10:38:58 CEST 2009 - uwedr@suse.de
+
+- Bugfix: mod copy ended in endless loop...
+
 -------------------------------------------------------------------
 Thu Apr  2 11:56:36 CEST 2009 - uwedr@suse.de
 
diff -r 4f305c07dd7c -r a1f609eae872 version.h
--- a/version.h	Thu Apr 02 09:57:36 2009 +0000
+++ b/version.h	Mon Apr 06 08:40:11 2009 +0000
@@ -4,10 +4,10 @@
 #include <QString>
 
 #define __VYM_NAME "VYM"
-#define __VYM_VERSION "1.12.2g"
+#define __VYM_VERSION "1.12.2h"
 #define __VYM_CODENAME "Maintenance Update "
 //#define __VYM_CODENAME "Codename: development version"
-#define __VYM_BUILD_DATE "2009-03-30"
+#define __VYM_BUILD_DATE "2009-04-06"
 
 
 bool checkVersion(const QString &);