Adding/moving MCO works again
authorinsilmaril
Mon, 04 Aug 2008 10:43:06 +0000
changeset 72311f9124c1cca
parent 722 462d39502273
child 724 cf14046909cd
Adding/moving MCO works again
branchobj.cpp
demos/vym-projectplan.vym
exports.cpp
linkablemapobj.cpp
mainwindow.cpp
mainwindow.h
mapeditor.cpp
mapeditor.h
selection.cpp
tex/vym.changelog
version.h
vymmodel.cpp
vymmodel.h
xml-vym.cpp
     1.1 --- a/branchobj.cpp	Wed Jul 16 11:56:44 2008 +0000
     1.2 +++ b/branchobj.cpp	Mon Aug 04 10:43:06 2008 +0000
     1.3 @@ -813,7 +813,7 @@
     1.4  	// Providing an ID for a branch makes export to XHTML easier
     1.5  	QString idAttr;
     1.6  	if (countXLinks()>0)
     1.7 -		idAttr=attribut ("id",mapEditor->getModel()->getSelectString(this)); //TODO directly access model
     1.8 +		idAttr=attribut ("id",model->getSelectString(this)); //TODO directly access model
     1.9  	else
    1.10  		idAttr="";
    1.11  
    1.12 @@ -1611,7 +1611,7 @@
    1.13  
    1.14  QString BranchObj::getSelectString()
    1.15  {
    1.16 -	return mapEditor->getModel()->getSelectString (this);
    1.17 +	return model->getSelectString (this);
    1.18  }
    1.19  
    1.20  void BranchObj::setAnimation(const AnimPoint &ap)
    1.21 @@ -1627,6 +1627,7 @@
    1.22  		setRelPos (anim);
    1.23  		return true;
    1.24  	}
    1.25 +	parObj->reposition();	// we might have been relinked meanwhile
    1.26  	return false;
    1.27  }
    1.28  
     2.1 Binary file demos/vym-projectplan.vym has changed
     3.1 --- a/exports.cpp	Wed Jul 16 11:56:44 2008 +0000
     3.2 +++ b/exports.cpp	Mon Aug 04 10:43:06 2008 +0000
     3.3 @@ -59,8 +59,6 @@
     3.4  
     3.5  bool ExportBase::execDialog()
     3.6  {
     3.7 -	//MapEditor *me=model.getMapEditor(); FIXME needed?
     3.8 -	// if (model->mapCenters.count() && me)
     3.9  	{
    3.10  		QFileDialog *fd=new QFileDialog( 0, caption);
    3.11  		fd->setFilter (filter);
     4.1 --- a/linkablemapobj.cpp	Wed Jul 16 11:56:44 2008 +0000
     4.2 +++ b/linkablemapobj.cpp	Mon Aug 04 10:43:06 2008 +0000
     4.3 @@ -133,7 +133,7 @@
     4.4  {
     4.5      parObj=o;
     4.6  	mapEditor=parObj->getMapEditor();
     4.7 -	model=parObj->getModel();	// FIXME makes painting slow, but that's obvious because there are no links to paint, hmmm....
     4.8 +	model=parObj->getModel();	
     4.9  }
    4.10  
    4.11  void LinkableMapObj::setParObjTmp(LinkableMapObj*,QPointF,int)	// FIXME make pure virtual
    4.12 @@ -669,7 +669,7 @@
    4.13  	// we want to block expensive repositioning, but just do it once at
    4.14  	// the end, thus check first:
    4.15  
    4.16 -	if (mapEditor->getModel()->isRepositionBlocked()) return;	// FIXME better go to model directly, maybe via a signal
    4.17 +	if (model->isRepositionBlocked()) return;	// FIXME better go to model directly, maybe via a signal
    4.18  	
    4.19  	// Pass on the request to parental objects, if this hasn't been done yet
    4.20  	
     5.1 --- a/mainwindow.cpp	Wed Jul 16 11:56:44 2008 +0000
     5.2 +++ b/mainwindow.cpp	Mon Aug 04 10:43:06 2008 +0000
     5.3 @@ -456,7 +456,7 @@
     5.4  	a->setEnabled (false);
     5.5      tb->addAction (a);
     5.6  	editMenu->addAction (a);
     5.7 -	actionEditUndo=a;
     5.8 +	actionUndo=a;
     5.9      
    5.10  	a = new QAction( QPixmap( iconPath+"redo.png"), tr( "&Redo","Edit menu" ), this); 
    5.11  	a->setStatusTip (tr( "Redo" ));
    5.12 @@ -464,7 +464,7 @@
    5.13      tb->addAction (a);
    5.14  	editMenu->addAction (a);
    5.15  	connect( a, SIGNAL( triggered() ), this, SLOT( editRedo() ) );
    5.16 -	actionEditRedo=a;
    5.17 +	actionRedo=a;
    5.18     
    5.19  	editMenu->addSeparator();
    5.20      a = new QAction(QPixmap( iconPath+"editcopy.png"), tr( "&Copy","Edit menu" ), this);
    5.21 @@ -474,7 +474,7 @@
    5.22      tb->addAction (a);
    5.23  	editMenu->addAction (a);
    5.24      connect( a, SIGNAL( triggered() ), this, SLOT( editCopy() ) );
    5.25 -	actionEditCopy=a;
    5.26 +	actionCopy=a;
    5.27  	
    5.28      a = new QAction(QPixmap( iconPath+"editcut.png" ), tr( "Cu&t","Edit menu" ), this);
    5.29  	a->setStatusTip ( tr( "Cut" ) );
    5.30 @@ -482,7 +482,7 @@
    5.31  	a->setEnabled (false);
    5.32      tb->addAction (a);
    5.33  	editMenu->addAction (a);
    5.34 -	actionEditCut=a;
    5.35 +	actionCut=a;
    5.36      connect( a, SIGNAL( triggered() ), this, SLOT( editCut() ) );
    5.37  	
    5.38      a = new QAction(QPixmap( iconPath+"editpaste.png"), tr( "&Paste","Edit menu" ),this);
    5.39 @@ -492,7 +492,7 @@
    5.40  	a->setEnabled (false);
    5.41      tb->addAction (a);
    5.42  	editMenu->addAction (a);
    5.43 -	actionEditPaste=a;
    5.44 +	actionPaste=a;
    5.45  
    5.46  /*
    5.47      // Shortcuts to modify heading:
    5.48 @@ -511,9 +511,8 @@
    5.49      connect( a, SIGNAL( triggered() ), this, SLOT( editHeading() ) );
    5.50  	actionListBranches.append(a);
    5.51  	editMenu->addAction (a);
    5.52 -	actionEditHeading=a;
    5.53 -
    5.54 -*/	
    5.55 +	actionHeading=a;
    5.56 +
    5.57      a = new QAction( tr( "Edit heading","Edit menu" ), this);
    5.58  	a->setStatusTip (tr( "edit Heading" ));
    5.59  	//a->setShortcut ( Qt::Key_F2 );					//Edit heading
    5.60 @@ -521,6 +520,7 @@
    5.61  	addAction (a);
    5.62      connect( a, SIGNAL( triggered() ), this, SLOT( editHeading() ) );
    5.63  	actionListBranches.append(a);
    5.64 +*/	
    5.65      
    5.66      // Shortcut to delete selection
    5.67      a = new QAction( tr( "Delete Selection","Edit menu" ),this);
    5.68 @@ -529,12 +529,12 @@
    5.69  	a->setShortcutContext (Qt::WindowShortcut);
    5.70  	addAction (a);
    5.71      connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteSelection() ) );
    5.72 -	actionEditDelete=a;
    5.73 +	actionDelete=a;
    5.74      
    5.75      // Shortcut to add mapcenter
    5.76  	a= new QAction(tr( "Add mapcenter","Canvas context menu" ), this);
    5.77      connect( a, SIGNAL( triggered() ), this, SLOT( editAddMapCenter() ) );
    5.78 -	actionEditAddMapCenter = a;
    5.79 +	actionAddMapCenter = a;
    5.80  
    5.81  
    5.82      // Shortcut to add branch
    5.83 @@ -551,12 +551,12 @@
    5.84  	actionListBranches.append(a);
    5.85  	#if defined (Q_OS_MACX)
    5.86  		// In OSX show different shortcut in menues, the keys work indepently always			
    5.87 -		actionEditAddBranch=alt;
    5.88 +		actionAddBranch=alt;
    5.89  	#else	
    5.90 -		actionEditAddBranch=a;
    5.91 +		actionAddBranch=a;
    5.92  	#endif	
    5.93 -	editMenu->addAction (actionEditAddBranch);
    5.94 -	tb->addAction (actionEditAddBranch);
    5.95 +	editMenu->addAction (actionAddBranch);
    5.96 +	tb->addAction (actionAddBranch);
    5.97  
    5.98  
    5.99      // Add branch by inserting it at selection
   5.100 @@ -568,7 +568,7 @@
   5.101      connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBefore() ) );
   5.102  	a->setEnabled (false);
   5.103  	actionListBranches.append(a);
   5.104 -	actionEditAddBranchBefore=a;
   5.105 +	actionAddBranchBefore=a;
   5.106  	a = new QAction(tr( "Add branch (insert)","Edit menu" ),this);
   5.107  	a->setStatusTip ( tr( "Add a branch by inserting and making selection its child" ));
   5.108  	a->setShortcut ( Qt::ALT + Qt::Key_A );			//Insert branch
   5.109 @@ -586,7 +586,7 @@
   5.110      connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchAbove() ) );
   5.111  	a->setEnabled (false);
   5.112  	actionListBranches.append(a);
   5.113 -	actionEditAddBranchAbove=a;
   5.114 +	actionAddBranchAbove=a;
   5.115      a = new QAction(tr( "Add branch above","Edit menu" ), this);
   5.116  	a->setStatusTip ( tr( "Add a branch above selection" ));
   5.117  	a->setShortcut (Qt::SHIFT+Qt::Key_A );			//Add branch above
   5.118 @@ -604,7 +604,7 @@
   5.119      connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBelow() ) );
   5.120  	a->setEnabled (false);
   5.121  	actionListBranches.append(a);
   5.122 -	actionEditAddBranchBelow=a;
   5.123 +	actionAddBranchBelow=a;
   5.124      a = new QAction(tr( "Add branch below","Edit menu" ), this);
   5.125  	a->setStatusTip ( tr( "Add a branch below selection" ));
   5.126  	a->setShortcut (Qt::CTRL +Qt::Key_A );			// Add branch below
   5.127 @@ -620,7 +620,7 @@
   5.128      tb->addAction (a);
   5.129  	editMenu->addAction (a);
   5.130      connect( a, SIGNAL( triggered() ), this, SLOT( editMoveUp() ) );
   5.131 -	actionEditMoveUp=a;
   5.132 +	actionMoveUp=a;
   5.133  
   5.134      a = new QAction( QPixmap( iconPath+"down.png"), tr( "Move down","Edit menu" ),this);
   5.135      connect( a, SIGNAL( triggered() ), this, SLOT( editMoveDown() ) );
   5.136 @@ -629,14 +629,14 @@
   5.137  	a->setEnabled (false);
   5.138      tb->addAction (a);
   5.139  	editMenu->addAction (a);
   5.140 -	actionEditMoveDown=a;
   5.141 +	actionMoveDown=a;
   5.142  	
   5.143  	a = new QAction( QPixmap(iconPath+"editsort.png" ), tr( "Sort children","Edit menu" ), this );
   5.144  	connect( a, SIGNAL( activated() ), this, SLOT( editSortChildren() ) );
   5.145  	a->setEnabled (true);
   5.146  	a->addTo( tb );
   5.147  	editMenu->addAction (a);
   5.148 -	actionEditSortChildren=a;
   5.149 +	actionSortChildren=a;
   5.150  
   5.151  	a = new QAction( QPixmap(flagsPath+"flag-scrolled-right.png"), tr( "Scroll branch","Edit menu" ),this);
   5.152  	a->setShortcut ( Qt::Key_ScrollLock );
   5.153 @@ -648,18 +648,18 @@
   5.154  	alt->setStatusTip (tr( "Scroll branch" )); 
   5.155      connect( alt, SIGNAL( triggered() ), this, SLOT( editToggleScroll() ) );
   5.156  	#if defined(Q_OS_MACX)
   5.157 -		actionEditToggleScroll=alt;
   5.158 +		actionToggleScroll=alt;
   5.159  	#else	
   5.160 -		actionEditToggleScroll=a;
   5.161 +		actionToggleScroll=a;
   5.162  	#endif	
   5.163 -	actionEditToggleScroll->setEnabled (false);
   5.164 -	actionEditToggleScroll->setToggleAction(true);
   5.165 -    tb->addAction (actionEditToggleScroll);
   5.166 -    editMenu->addAction ( actionEditToggleScroll);
   5.167 -	editMenu->addAction (actionEditToggleScroll);
   5.168 +	actionToggleScroll->setEnabled (false);
   5.169 +	actionToggleScroll->setToggleAction(true);
   5.170 +    tb->addAction (actionToggleScroll);
   5.171 +    editMenu->addAction ( actionToggleScroll);
   5.172 +	editMenu->addAction (actionToggleScroll);
   5.173  	addAction (a);
   5.174  	addAction (alt);
   5.175 -	actionListBranches.append(actionEditToggleScroll);
   5.176 +	actionListBranches.append(actionToggleScroll);
   5.177  	
   5.178      a = new QAction( tr( "Unscroll children","Edit menu" ), this);
   5.179  	a->setStatusTip (tr( "Unscroll all scrolled branches in selected subtree" ));
   5.180 @@ -682,21 +682,21 @@
   5.181      tb->addAction (a);
   5.182  	addAction(a);
   5.183      connect( a, SIGNAL( triggered() ), this, SLOT( editOpenURL() ) );
   5.184 -	actionEditOpenURL=a;
   5.185 +	actionOpenURL=a;
   5.186  
   5.187  	a = new QAction( tr( "Open URL in new tab","Edit menu" ), this);
   5.188  	a->setStatusTip (tr( "Open URL in new tab" ));
   5.189  	//a->setShortcut (Qt::CTRL+Qt::Key_U );
   5.190  	addAction(a);
   5.191      connect( a, SIGNAL( triggered() ), this, SLOT( editOpenURLTab() ) );
   5.192 -	actionEditOpenURLTab=a;
   5.193 +	actionOpenURLTab=a;
   5.194  
   5.195  	a = new QAction( tr( "Open all URLs in subtree","Edit menu" ), this);
   5.196  	a->setStatusTip (tr( "Open all URLs in subtree" ));
   5.197  	addAction(a);
   5.198  	actionListBranches.append(a);
   5.199      connect( a, SIGNAL( triggered() ), this, SLOT( editOpenMultipleURLTabs() ) );
   5.200 -	actionEditOpenMultipleURLTabs=a;
   5.201 +	actionOpenMultipleURLTabs=a;
   5.202  
   5.203  	a = new QAction(QPixmap(), tr( "Edit URL...","Edit menu"), this);
   5.204  	a->setStatusTip ( tr( "Edit URL" ) );
   5.205 @@ -705,7 +705,7 @@
   5.206  	actionListBranches.append(a);
   5.207  	addAction(a);
   5.208      connect( a, SIGNAL( triggered() ), this, SLOT( editURL() ) );
   5.209 -	actionEditURL=a;
   5.210 +	actionURL=a;
   5.211  	
   5.212  	a = new QAction(QPixmap(), tr( "Edit local URL...","Edit menu"), this);
   5.213  	a->setStatusTip ( tr( "Edit local URL" ) );
   5.214 @@ -714,42 +714,42 @@
   5.215  	actionListBranches.append(a);
   5.216  	addAction(a);
   5.217      connect( a, SIGNAL( triggered() ), this, SLOT( editLocalURL() ) );
   5.218 -	actionEditLocalURL=a;
   5.219 +	actionLocalURL=a;
   5.220  	
   5.221  	a = new QAction( tr( "Use heading for URL","Edit menu" ), this);
   5.222  	a->setStatusTip ( tr( "Use heading of selected branch as URL" ));
   5.223  	a->setEnabled (false);
   5.224  	actionListBranches.append(a);
   5.225      connect( a, SIGNAL( triggered() ), this, SLOT( editHeading2URL() ) );
   5.226 -	actionEditHeading2URL=a;
   5.227 +	actionHeading2URL=a;
   5.228      
   5.229  	a = new QAction(tr( "Create URL to Novell Bugzilla","Edit menu" ), this);
   5.230  	a->setStatusTip ( tr( "Create URL to Novell Bugzilla" ));
   5.231  	a->setEnabled (false);
   5.232  	actionListBranches.append(a);
   5.233      connect( a, SIGNAL( triggered() ), this, SLOT( editBugzilla2URL() ) );
   5.234 -	actionEditBugzilla2URL=a;
   5.235 +	actionBugzilla2URL=a;
   5.236      
   5.237  	a = new QAction(tr( "Create URL to Novell FATE","Edit menu" ), this);
   5.238  	a->setStatusTip ( tr( "Create URL to Novell FATE" ));
   5.239  	a->setEnabled (false);
   5.240  	actionListBranches.append(a);
   5.241      connect( a, SIGNAL( triggered() ), this, SLOT( editFATE2URL() ) );
   5.242 -	actionEditFATE2URL=a;
   5.243 +	actionFATE2URL=a;
   5.244  	
   5.245      a = new QAction(QPixmap(flagsPath+"flag-vymlink.png"), tr( "Open linked map","Edit menu" ), this);
   5.246  	a->setStatusTip ( tr( "Jump to another vym map, if needed load it first" ));
   5.247      tb->addAction (a);
   5.248  	a->setEnabled (false);
   5.249      connect( a, SIGNAL( triggered() ), this, SLOT( editOpenVymLink() ) );
   5.250 -	actionEditOpenVymLink=a;
   5.251 +	actionOpenVymLink=a;
   5.252  	
   5.253      a = new QAction(QPixmap(), tr( "Open all vym links in subtree","Edit menu" ), this);
   5.254  	a->setStatusTip ( tr( "Open all vym links in subtree" ));
   5.255  	a->setEnabled (false);
   5.256  	actionListBranches.append(a);
   5.257      connect( a, SIGNAL( triggered() ), this, SLOT( editOpenMultipleVymLinks() ) );
   5.258 -	actionEditOpenMultipleVymLinks=a;
   5.259 +	actionOpenMultipleVymLinks=a;
   5.260  	
   5.261  
   5.262      a = new QAction(tr( "Edit vym link...","Edit menu" ), this);
   5.263 @@ -757,13 +757,13 @@
   5.264  	a->setStatusTip ( tr( "Edit link to another vym map" ));
   5.265      connect( a, SIGNAL( triggered() ), this, SLOT( editVymLink() ) );
   5.266  	actionListBranches.append(a);
   5.267 -	actionEditVymLink=a;
   5.268 +	actionVymLink=a;
   5.269  
   5.270      a = new QAction(tr( "Delete vym link","Edit menu" ),this);
   5.271  	a->setStatusTip ( tr( "Delete link to another vym map" ));
   5.272  	a->setEnabled (false);
   5.273      connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteVymLink() ) );
   5.274 -	actionEditDeleteVymLink=a;
   5.275 +	actionDeleteVymLink=a;
   5.276  
   5.277      a = new QAction(QPixmap(flagsPath+"flag-hideexport.png"), tr( "Hide in exports","Edit menu" ), this);
   5.278  	a->setStatusTip ( tr( "Hide object in exports" ) );
   5.279 @@ -772,13 +772,13 @@
   5.280      tb->addAction (a);
   5.281  	a->setEnabled (false);
   5.282      connect( a, SIGNAL( triggered() ), this, SLOT( editToggleHideExport() ) );
   5.283 -	actionEditToggleHideExport=a;
   5.284 +	actionToggleHideExport=a;
   5.285  
   5.286      a = new QAction(tr( "Edit Map Info...","Edit menu" ),this);
   5.287  	a->setStatusTip ( tr( "Edit Map Info" ));
   5.288  	a->setEnabled (true);
   5.289      connect( a, SIGNAL( triggered() ), this, SLOT( editMapInfo() ) );
   5.290 -	actionEditMapInfo=a;
   5.291 +	actionMapInfo=a;
   5.292  
   5.293  	// Import at selection (adding to selection)
   5.294      a = new QAction( tr( "Add map (insert)","Edit menu" ),this);
   5.295 @@ -786,7 +786,7 @@
   5.296      connect( a, SIGNAL( triggered() ), this, SLOT( editImportAdd() ) );
   5.297  	a->setEnabled (false);
   5.298  	actionListBranches.append(a);
   5.299 -	actionEditImportAdd=a;
   5.300 +	actionImportAdd=a;
   5.301  
   5.302  	// Import at selection (replacing selection)
   5.303      a = new QAction( tr( "Add map (replace)","Edit menu" ), this);
   5.304 @@ -794,7 +794,7 @@
   5.305      connect( a, SIGNAL( triggered() ), this, SLOT( editImportReplace() ) );
   5.306  	a->setEnabled (false);
   5.307  	actionListBranches.append(a);
   5.308 -	actionEditImportReplace=a;
   5.309 +	actionImportReplace=a;
   5.310  
   5.311  	// Save selection 
   5.312      a = new QAction( tr( "Save selection","Edit menu" ), this);
   5.313 @@ -802,7 +802,7 @@
   5.314      connect( a, SIGNAL( triggered() ), this, SLOT( editSaveBranch() ) );
   5.315  	a->setEnabled (false);
   5.316  	actionListBranches.append(a);
   5.317 -	actionEditSaveBranch=a;
   5.318 +	actionSaveBranch=a;
   5.319  
   5.320  	// Only remove branch, not its children
   5.321      a = new QAction(tr( "Remove only branch ","Edit menu" ), this);
   5.322 @@ -812,7 +812,7 @@
   5.323  	a->setEnabled (false);
   5.324  	addAction (a);
   5.325  	actionListBranches.append(a);
   5.326 -	actionEditDeleteKeepChildren=a;
   5.327 +	actionDeleteKeepChildren=a;
   5.328  
   5.329  	// Only remove children of a branch
   5.330      a = new QAction( tr( "Remove children","Edit menu" ), this);
   5.331 @@ -821,7 +821,7 @@
   5.332      connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteChildren() ) );
   5.333  	a->setEnabled (false);
   5.334  	actionListBranches.append(a);
   5.335 -	actionEditDeleteChildren=a;
   5.336 +	actionDeleteChildren=a;
   5.337  
   5.338      // Shortcuts for navigating with cursor:
   5.339      a = new QAction(tr( "Select upper branch","Edit menu" ), this);
   5.340 @@ -856,7 +856,7 @@
   5.341  	a->setEnabled (false);
   5.342  	editMenu->addAction (a);
   5.343  	actionListBranches.append(a);
   5.344 -	actionEditSelectFirst=a;
   5.345 +	actionSelectFirst=a;
   5.346      connect( a, SIGNAL( triggered() ), this, SLOT( editFirstBranch() ) );
   5.347      a = new QAction( tr( "Select last branch","Edit menu" ),this);
   5.348  	a->setStatusTip (tr( "Select last branch" ));
   5.349 @@ -867,12 +867,12 @@
   5.350  	a->setEnabled (false);
   5.351  	editMenu->addAction (a);
   5.352  	actionListBranches.append(a);
   5.353 -	actionEditSelectLast=a;
   5.354 +	actionSelectLast=a;
   5.355  
   5.356      a = new QAction( tr( "Add Image...","Edit menu" ), this);
   5.357  	a->setStatusTip (tr( "Add Image" ));
   5.358      connect( a, SIGNAL( triggered() ), this, SLOT( editLoadImage() ) );
   5.359 -	actionEditLoadImage=a;
   5.360 +	actionLoadImage=a;
   5.361  
   5.362      a = new QAction( tr( "Property window","Dialog to edit properties of selection" )+QString ("..."), this);
   5.363  	a->setStatusTip (tr( "Set properties for selection" ));
   5.364 @@ -1542,50 +1542,50 @@
   5.365  
   5.366  		// Submenu "Add"
   5.367  		branchAddContextMenu =branchContextMenu->addMenu (tr("Add"));
   5.368 -		branchAddContextMenu->addAction (actionEditPaste );
   5.369 -		branchAddContextMenu->addAction ( actionEditAddBranch );
   5.370 -		branchAddContextMenu->addAction ( actionEditAddBranchBefore );
   5.371 -		branchAddContextMenu->addAction ( actionEditAddBranchAbove);
   5.372 -		branchAddContextMenu->addAction ( actionEditAddBranchBelow );
   5.373 +		branchAddContextMenu->addAction (actionPaste );
   5.374 +		branchAddContextMenu->addAction ( actionAddBranch );
   5.375 +		branchAddContextMenu->addAction ( actionAddBranchBefore );
   5.376 +		branchAddContextMenu->addAction ( actionAddBranchAbove);
   5.377 +		branchAddContextMenu->addAction ( actionAddBranchBelow );
   5.378  		branchAddContextMenu->addSeparator();	
   5.379 -		branchAddContextMenu->addAction ( actionEditImportAdd );
   5.380 -		branchAddContextMenu->addAction ( actionEditImportReplace );
   5.381 +		branchAddContextMenu->addAction ( actionImportAdd );
   5.382 +		branchAddContextMenu->addAction ( actionImportReplace );
   5.383  
   5.384  		// Submenu "Remove"
   5.385  		branchRemoveContextMenu =branchContextMenu->addMenu (tr ("Remove","Context menu name"));
   5.386 -		branchRemoveContextMenu->addAction (actionEditCut);
   5.387 -		branchRemoveContextMenu->addAction ( actionEditDelete );
   5.388 -		branchRemoveContextMenu->addAction ( actionEditDeleteKeepChildren );
   5.389 -		branchRemoveContextMenu->addAction ( actionEditDeleteChildren );
   5.390 +		branchRemoveContextMenu->addAction (actionCut);
   5.391 +		branchRemoveContextMenu->addAction ( actionDelete );
   5.392 +		branchRemoveContextMenu->addAction ( actionDeleteKeepChildren );
   5.393 +		branchRemoveContextMenu->addAction ( actionDeleteChildren );
   5.394  		
   5.395  
   5.396 -	actionEditSaveBranch->addTo( branchContextMenu );
   5.397 +	actionSaveBranch->addTo( branchContextMenu );
   5.398  	actionFileNewCopy->addTo (branchContextMenu );
   5.399  
   5.400  	branchContextMenu->addSeparator();	
   5.401 -	branchContextMenu->addAction ( actionEditLoadImage);
   5.402 +	branchContextMenu->addAction ( actionLoadImage);
   5.403  
   5.404  	// Submenu for Links (URLs, vymLinks)
   5.405  	branchLinksContextMenu =new QMenu (this);
   5.406  
   5.407  		branchContextMenu->addSeparator();	
   5.408  		branchLinksContextMenu=branchContextMenu->addMenu(tr("References (URLs, vymLinks, ...)","Context menu name"));	
   5.409 -		branchLinksContextMenu->addAction ( actionEditOpenURL );
   5.410 -		branchLinksContextMenu->addAction ( actionEditOpenURLTab );
   5.411 -		branchLinksContextMenu->addAction ( actionEditOpenMultipleURLTabs );
   5.412 -		branchLinksContextMenu->addAction ( actionEditURL );
   5.413 -		branchLinksContextMenu->addAction ( actionEditLocalURL );
   5.414 -		branchLinksContextMenu->addAction ( actionEditHeading2URL );
   5.415 -		branchLinksContextMenu->addAction ( actionEditBugzilla2URL );
   5.416 +		branchLinksContextMenu->addAction ( actionOpenURL );
   5.417 +		branchLinksContextMenu->addAction ( actionOpenURLTab );
   5.418 +		branchLinksContextMenu->addAction ( actionOpenMultipleURLTabs );
   5.419 +		branchLinksContextMenu->addAction ( actionURL );
   5.420 +		branchLinksContextMenu->addAction ( actionLocalURL );
   5.421 +		branchLinksContextMenu->addAction ( actionHeading2URL );
   5.422 +		branchLinksContextMenu->addAction ( actionBugzilla2URL );
   5.423  		if (settings.value( "/mainwindow/showTestMenu",false).toBool() )
   5.424  		{
   5.425 -			branchLinksContextMenu->addAction ( actionEditFATE2URL );
   5.426 +			branchLinksContextMenu->addAction ( actionFATE2URL );
   5.427  		}	
   5.428  		branchLinksContextMenu->addSeparator();	
   5.429 -		branchLinksContextMenu->addAction ( actionEditOpenVymLink );
   5.430 -		branchLinksContextMenu->addAction ( actionEditOpenMultipleVymLinks );
   5.431 -		branchLinksContextMenu->addAction ( actionEditVymLink );
   5.432 -		branchLinksContextMenu->addAction ( actionEditDeleteVymLink );
   5.433 +		branchLinksContextMenu->addAction ( actionOpenVymLink );
   5.434 +		branchLinksContextMenu->addAction ( actionOpenMultipleVymLinks );
   5.435 +		branchLinksContextMenu->addAction ( actionVymLink );
   5.436 +		branchLinksContextMenu->addAction ( actionDeleteVymLink );
   5.437  		
   5.438  
   5.439  	// Context Menu for XLinks in a branch menu
   5.440 @@ -1604,8 +1604,8 @@
   5.441  	floatimageContextMenu->addAction (a);
   5.442  
   5.443  	floatimageContextMenu->addSeparator();	
   5.444 -	actionEditCopy->addTo( floatimageContextMenu );
   5.445 -	actionEditCut->addTo( floatimageContextMenu );
   5.446 +	actionCopy->addTo( floatimageContextMenu );
   5.447 +	actionCut->addTo( floatimageContextMenu );
   5.448  
   5.449  	floatimageContextMenu->addSeparator();	
   5.450  	floatimageContextMenu->addAction ( actionFormatHideLinkUnselected );
   5.451 @@ -1613,9 +1613,9 @@
   5.452  	
   5.453  	// Context menu for canvas
   5.454  	canvasContextMenu =new QMenu (this);
   5.455 -	actionEditMapInfo->addTo( canvasContextMenu );
   5.456  	if (settings.value( "/mainwindow/showTestMenu",false).toBool() ) 
   5.457 -		actionEditAddMapCenter->addTo( canvasContextMenu );
   5.458 +		actionAddMapCenter->addTo( canvasContextMenu );
   5.459 +	actionMapInfo->addTo( canvasContextMenu );
   5.460  	canvasContextMenu->insertSeparator();	
   5.461  	actionGroupFormatLinkStyles->addTo( canvasContextMenu );
   5.462  	canvasContextMenu->insertSeparator();	
   5.463 @@ -3412,10 +3412,10 @@
   5.464  {
   5.465  	if (actionSettingsUseDelKey->isOn())
   5.466  	{
   5.467 -		actionEditDelete->setAccel (QKeySequence (Qt::Key_Delete));
   5.468 +		actionDelete->setAccel (QKeySequence (Qt::Key_Delete));
   5.469  	} else
   5.470  	{
   5.471 -		actionEditDelete->setAccel (QKeySequence (""));
   5.472 +		actionDelete->setAccel (QKeySequence (""));
   5.473  	}
   5.474  }
   5.475  
   5.476 @@ -3482,9 +3482,9 @@
   5.477  	if (m) m->updateNoteFlag();
   5.478  }
   5.479  
   5.480 -void Main::updateSatellites(MapEditor *me)
   5.481 +void Main::updateSatellites(VymModel* model)
   5.482  {
   5.483 -	branchPropertyWindow->setModel (me->getModel() );
   5.484 +	branchPropertyWindow->setModel (model );
   5.485  }
   5.486  
   5.487  void Main::updateActions()
   5.488 @@ -3534,14 +3534,14 @@
   5.489  
   5.490  	actionFileSave->setEnabled( m->hasChanged() );
   5.491  	if (m->isUndoAvailable())
   5.492 -		actionEditUndo->setEnabled( true);
   5.493 +		actionUndo->setEnabled( true);
   5.494  	else	
   5.495 -		actionEditUndo->setEnabled( false);
   5.496 +		actionUndo->setEnabled( false);
   5.497  
   5.498  	if (m->isRedoAvailable())
   5.499 -		actionEditRedo->setEnabled( true);
   5.500 +		actionRedo->setEnabled( true);
   5.501  	else	
   5.502 -		actionEditRedo->setEnabled( false);
   5.503 +		actionRedo->setEnabled( false);
   5.504  
   5.505  	LinkableMapObj *selection=m->getSelection();
   5.506  	if (selection)
   5.507 @@ -3577,54 +3577,54 @@
   5.508  
   5.509  			standardFlagsDefault->setEnabled (true);
   5.510  
   5.511 -			actionEditToggleScroll->setEnabled (true);
   5.512 +			actionToggleScroll->setEnabled (true);
   5.513  			if ( bo->isScrolled() )
   5.514 -				actionEditToggleScroll->setOn(true);
   5.515 +				actionToggleScroll->setOn(true);
   5.516  			else	
   5.517 -				actionEditToggleScroll->setOn(false);
   5.518 +				actionToggleScroll->setOn(false);
   5.519  
   5.520  			if ( bo->getURL().isEmpty() )
   5.521  			{
   5.522 -				actionEditOpenURL->setEnabled (false);
   5.523 -				actionEditOpenURLTab->setEnabled (false);
   5.524 +				actionOpenURL->setEnabled (false);
   5.525 +				actionOpenURLTab->setEnabled (false);
   5.526  			}	
   5.527  			else	
   5.528  			{
   5.529 -				actionEditOpenURL->setEnabled (true);
   5.530 -				actionEditOpenURLTab->setEnabled (true);
   5.531 +				actionOpenURL->setEnabled (true);
   5.532 +				actionOpenURLTab->setEnabled (true);
   5.533  			}
   5.534  			if ( bo->getVymLink().isEmpty() )
   5.535  			{
   5.536 -				actionEditOpenVymLink->setEnabled (false);
   5.537 -				actionEditDeleteVymLink->setEnabled (false);
   5.538 +				actionOpenVymLink->setEnabled (false);
   5.539 +				actionDeleteVymLink->setEnabled (false);
   5.540  			} else	
   5.541  			{
   5.542 -				actionEditOpenVymLink->setEnabled (true);
   5.543 -				actionEditDeleteVymLink->setEnabled (true);
   5.544 +				actionOpenVymLink->setEnabled (true);
   5.545 +				actionDeleteVymLink->setEnabled (true);
   5.546  			}	
   5.547  
   5.548  			if (bo->canMoveBranchUp()) 
   5.549 -				actionEditMoveUp->setEnabled (true);
   5.550 +				actionMoveUp->setEnabled (true);
   5.551  			else	
   5.552 -				actionEditMoveUp->setEnabled (false);
   5.553 +				actionMoveUp->setEnabled (false);
   5.554  			if (bo->canMoveBranchDown()) 
   5.555 -				actionEditMoveDown->setEnabled (true);
   5.556 +				actionMoveDown->setEnabled (true);
   5.557  			else	
   5.558 -				actionEditMoveDown->setEnabled (false);
   5.559 -
   5.560 -
   5.561 -			actionEditToggleHideExport->setEnabled (true);	
   5.562 -			actionEditToggleHideExport->setOn (bo->hideInExport() );	
   5.563 -
   5.564 -			actionEditCopy->setEnabled (true);	
   5.565 -			actionEditCut->setEnabled (true);	
   5.566 +				actionMoveDown->setEnabled (false);
   5.567 +
   5.568 +
   5.569 +			actionToggleHideExport->setEnabled (true);	
   5.570 +			actionToggleHideExport->setOn (bo->hideInExport() );	
   5.571 +
   5.572 +			actionCopy->setEnabled (true);	
   5.573 +			actionCut->setEnabled (true);	
   5.574  			if (!clipboardEmpty)
   5.575 -				actionEditPaste->setEnabled (true);	
   5.576 +				actionPaste->setEnabled (true);	
   5.577  			else	
   5.578 -				actionEditPaste->setEnabled (false);	
   5.579 +				actionPaste->setEnabled (false);	
   5.580  			for (int i=0; i<actionListBranches.size(); ++i)	
   5.581  				actionListBranches.at(i)->setEnabled(true);
   5.582 -			actionEditDelete->setEnabled (true);
   5.583 +			actionDelete->setEnabled (true);
   5.584  			actionFormatHideLinkUnselected->setOn
   5.585  				(selection->getHideLinkUnselected());
   5.586  		}
   5.587 @@ -3632,42 +3632,42 @@
   5.588  		{
   5.589  			FloatObj *fo=(FloatImageObj*)selection;
   5.590  
   5.591 -			actionEditOpenURL->setEnabled (false);
   5.592 -			actionEditOpenVymLink->setEnabled (false);
   5.593 -			actionEditDeleteVymLink->setEnabled (false);	
   5.594 -			actionEditToggleHideExport->setEnabled (true);	
   5.595 -			actionEditToggleHideExport->setOn (fo->hideInExport() );	
   5.596 -
   5.597 -
   5.598 -			actionEditCopy->setEnabled (true);
   5.599 -			actionEditCut->setEnabled (true);	
   5.600 -			actionEditPaste->setEnabled (false);
   5.601 +			actionOpenURL->setEnabled (false);
   5.602 +			actionOpenVymLink->setEnabled (false);
   5.603 +			actionDeleteVymLink->setEnabled (false);	
   5.604 +			actionToggleHideExport->setEnabled (true);	
   5.605 +			actionToggleHideExport->setOn (fo->hideInExport() );	
   5.606 +
   5.607 +
   5.608 +			actionCopy->setEnabled (true);
   5.609 +			actionCut->setEnabled (true);	
   5.610 +			actionPaste->setEnabled (false);
   5.611  			for (int i=0; i<actionListBranches.size(); ++i)	
   5.612  				actionListBranches.at(i)->setEnabled(false);
   5.613 -			actionEditDelete->setEnabled (true);
   5.614 +			actionDelete->setEnabled (true);
   5.615  			actionFormatHideLinkUnselected->setOn
   5.616  				( selection->getHideLinkUnselected());
   5.617 -			actionEditMoveUp->setEnabled (false);
   5.618 -			actionEditMoveDown->setEnabled (false);
   5.619 +			actionMoveUp->setEnabled (false);
   5.620 +			actionMoveDown->setEnabled (false);
   5.621  		}
   5.622  
   5.623  	} else
   5.624  	{
   5.625 -		actionEditCopy->setEnabled (false);	
   5.626 -		actionEditCut->setEnabled (false);	
   5.627 -		actionEditPaste->setEnabled (false);	
   5.628 +		actionCopy->setEnabled (false);	
   5.629 +		actionCut->setEnabled (false);	
   5.630 +		actionPaste->setEnabled (false);	
   5.631  		for (int i=0; i<actionListBranches.size(); ++i)	
   5.632  			actionListBranches.at(i)->setEnabled(false);
   5.633  
   5.634 -		actionEditToggleScroll->setEnabled (false);
   5.635 -		actionEditOpenURL->setEnabled (false);
   5.636 -		actionEditOpenVymLink->setEnabled (false);
   5.637 -		actionEditDeleteVymLink->setEnabled (false);	
   5.638 -		actionEditHeading2URL->setEnabled (false);	
   5.639 -		actionEditDelete->setEnabled (false);
   5.640 -		actionEditMoveUp->setEnabled (false);
   5.641 -		actionEditMoveDown->setEnabled (false);
   5.642 -		actionEditToggleHideExport->setEnabled (false);	
   5.643 +		actionToggleScroll->setEnabled (false);
   5.644 +		actionOpenURL->setEnabled (false);
   5.645 +		actionOpenVymLink->setEnabled (false);
   5.646 +		actionDeleteVymLink->setEnabled (false);	
   5.647 +		actionHeading2URL->setEnabled (false);	
   5.648 +		actionDelete->setEnabled (false);
   5.649 +		actionMoveUp->setEnabled (false);
   5.650 +		actionMoveDown->setEnabled (false);
   5.651 +		actionToggleHideExport->setEnabled (false);	
   5.652  	}	
   5.653  }
   5.654  
     6.1 --- a/mainwindow.h	Wed Jul 16 11:56:44 2008 +0000
     6.2 +++ b/mainwindow.h	Mon Aug 04 10:43:06 2008 +0000
     6.3 @@ -196,7 +196,7 @@
     6.4  	void windowToggleAntiAlias();
     6.5  	void windowToggleSmoothPixmap();
     6.6  	void updateNoteFlag();
     6.7 -	void updateSatellites(MapEditor *);
     6.8 +	void updateSatellites(VymModel*);
     6.9  	void updateActions();
    6.10  	ModMode getModMode();
    6.11  	bool autoEditNewBranch();
    6.12 @@ -258,44 +258,48 @@
    6.13  	QAction* actionFileNewCopy;
    6.14  	QAction* actionFileSave;
    6.15  	QAction* actionFilePrint;
    6.16 -	QAction* actionEditUndo;
    6.17 -	QAction* actionEditRedo;
    6.18 -	QAction *actionEditCopy;
    6.19 -	QAction *actionEditCut;
    6.20 -	QAction *actionEditPaste;
    6.21 -	QAction *actionEditMoveUp;
    6.22 -	QAction *actionEditMoveDown;
    6.23 -	QAction *actionEditSortChildren;
    6.24 -	QAction *actionEditToggleScroll;
    6.25 -	QAction* actionEditOpenURL;
    6.26 -	QAction* actionEditOpenURLTab;
    6.27 -	QAction* actionEditOpenMultipleURLTabs;
    6.28 -	QAction* actionEditURL;
    6.29 -	QAction* actionEditLocalURL;
    6.30 -	QAction* actionEditHeading2URL;
    6.31 -	QAction* actionEditBugzilla2URL;
    6.32 -	QAction* actionEditFATE2URL;
    6.33 -	QAction *actionEditOpenVymLink;
    6.34 -	QAction *actionEditOpenMultipleVymLinks;
    6.35 -	QAction *actionEditVymLink;
    6.36 -	QAction *actionEditDeleteVymLink;
    6.37 -	QAction *actionEditToggleHideExport;
    6.38 -	QAction *actionEditMapInfo;
    6.39 -	QAction *actionEditHeading;
    6.40 -	QAction *actionEditDelete;
    6.41 -	QAction *actionEditAddMapCenter;
    6.42 -	QAction *actionEditAddBranch;
    6.43 -	QAction *actionEditAddBranchBefore;
    6.44 -	QAction *actionEditAddBranchAbove;
    6.45 -	QAction *actionEditAddBranchBelow;
    6.46 -	QAction *actionEditDeleteKeepChildren;
    6.47 -	QAction *actionEditDeleteChildren;
    6.48 -	QAction *actionEditImportAdd;
    6.49 -	QAction *actionEditImportReplace;
    6.50 -	QAction *actionEditSaveBranch;
    6.51 -	QAction *actionEditSelectFirst;
    6.52 -	QAction *actionEditSelectLast;
    6.53 -	QAction *actionEditLoadImage;
    6.54 +	QAction* actionUndo;
    6.55 +	QAction* actionRedo;
    6.56 +	QAction *actionCopy;
    6.57 +	QAction *actionCut;
    6.58 +	QAction *actionPaste;
    6.59 +	QAction *actionMoveUp;
    6.60 +	QAction *actionMoveDown;
    6.61 +	QAction *actionSortChildren;
    6.62 +	QAction *actionToggleScroll;
    6.63 +	QAction* actionOpenURL;
    6.64 +	QAction* actionOpenURLTab;
    6.65 +	QAction* actionOpenMultipleURLTabs;
    6.66 +	QAction* actionURL;
    6.67 +	QAction* actionLocalURL;
    6.68 +	QAction* actionHeading2URL;
    6.69 +	QAction* actionBugzilla2URL;
    6.70 +	QAction* actionFATE2URL;
    6.71 +	QAction *actionOpenVymLink;
    6.72 +	QAction *actionOpenMultipleVymLinks;
    6.73 +	QAction *actionVymLink;
    6.74 +	QAction *actionDeleteVymLink;
    6.75 +	QAction *actionToggleHideExport;
    6.76 +	QAction *actionMapInfo;
    6.77 +	QAction *actionHeading;
    6.78 +	QAction *actionDelete;
    6.79 +
    6.80 +public:
    6.81 +	QAction *actionAddMapCenter;
    6.82 +
    6.83 +private:	
    6.84 +	QAction *actionAddBranch;
    6.85 +	QAction *actionAddBranchBefore;
    6.86 +	QAction *actionAddBranchAbove;
    6.87 +	QAction *actionAddBranchBelow;
    6.88 +	QAction *actionDeleteKeepChildren;
    6.89 +	QAction *actionDeleteChildren;
    6.90 +	QAction *actionImportAdd;
    6.91 +	QAction *actionImportReplace;
    6.92 +	QAction *actionSaveBranch;
    6.93 +	QAction *actionSelectFirst;
    6.94 +	QAction *actionSelectLast;
    6.95 +	QAction *actionLoadImage;
    6.96  
    6.97  	QAction* actionFormatColor;
    6.98  	QAction* actionFormatPickColor;
     7.1 --- a/mapeditor.cpp	Wed Jul 16 11:56:44 2008 +0000
     7.2 +++ b/mapeditor.cpp	Mon Aug 04 10:43:06 2008 +0000
     7.3 @@ -42,7 +42,6 @@
     7.4  
     7.5  	model=vm;
     7.6  	model->setScene (mapScene);
     7.7 -	model->setMapEditor (this);
     7.8  	model->registerEditor(this);
     7.9  	model->addMapCenter();	//  FIXME create this in MapEditor until BO and MCO are independent of scene
    7.10  	model->makeDefault();
    7.11 @@ -71,7 +70,7 @@
    7.12  
    7.13  	setAcceptDrops (true);	
    7.14  
    7.15 -	model->reposition();	//FIXME really still needed?
    7.16 +	//model->reposition();	//FIXME really still needed?
    7.17  
    7.18  
    7.19  	// Action to embed LineEdit for heading in Scene
    7.20 @@ -287,10 +286,30 @@
    7.21  
    7.22  void MapEditor::testFunction1()
    7.23  {
    7.24 -	BranchObj *bo=model->getSelectedBranch();
    7.25 +	//BranchObj *bo=model->getSelectedBranch();
    7.26  	//if (bo) model->moveAway (bo);
    7.27 -	if (bo) bo->setLinkStyle (LinkableMapObj::Line);
    7.28 +	//if (bo) bo->setLinkStyle (LinkableMapObj::Line);
    7.29  	
    7.30 +
    7.31 +	// Displacement and animation of all non-mainbranches
    7.32 +	QPointF p;
    7.33 +	QPointF q;
    7.34 +	BranchObj *bo;
    7.35 +	bo=model->first();
    7.36 +	while (bo) 
    7.37 +	{
    7.38 +		if (bo->getDepth() >0 && !bo->hasScrolledParent(bo) )
    7.39 +		{
    7.40 +			p=QPointF (qrand() %600-300, qrand () %600-300);
    7.41 +			bo->setRelPos();
    7.42 +			q=bo->getRelPos();
    7.43 +			model->startAnimation (bo,p, q);
    7.44 +		}
    7.45 +		bo=model->next(bo);
    7.46 +	}
    7.47 +
    7.48 +
    7.49 +
    7.50  /* TODO Hide hidden stuff temporary, maybe add this as regular function somewhere
    7.51  	if (hidemode==HideNone)
    7.52  	{
    7.53 @@ -400,8 +419,11 @@
    7.54  	{ // No MapObj found, we are on the Canvas itself
    7.55  		// Context Menu on scene
    7.56  		model->updateActions();
    7.57 -		contextMenuPos=p;
    7.58 -		canvasContextMenu->popup(e->globalPos() );
    7.59 +		
    7.60 +		// Open context menu synchronously to position new mapcenter
    7.61 +		model->setContextPos (p);
    7.62 +		canvasContextMenu->exec(e->globalPos() );
    7.63 +		model->unsetContextPos ();
    7.64      } 
    7.65  	e->accept();
    7.66  }
    7.67 @@ -796,9 +818,9 @@
    7.68                  QString pold=qpointfToString(movingObj_orgPos);
    7.69                  QString pnow=qpointfToString(bo->getAbsPos());
    7.70                  model->saveState(
    7.71 -                    fo,
    7.72 +                    bo,
    7.73                      "move "+pold,
    7.74 -                    fo,
    7.75 +                    bo,
    7.76                      "move "+pnow,
    7.77                      QString("Move mapcenter %1 to position %2").arg(getName(bo)).arg(pnow));
    7.78              }
    7.79 @@ -890,6 +912,7 @@
    7.80  			//		if (lmosel->getOrientation()==LinkableMapObj::LeftOfCenter) dst.setX (dst.x()+lmosel->width() );
    7.81  					
    7.82  					model->startAnimation(
    7.83 +						(BranchObj*)lmosel,
    7.84  						lmosel->getRelPos(),
    7.85  						movingObj_orgRelPos
    7.86  //						QPointF (movingObj_orgPos.x() - dst.x(), movingObj_orgPos.y() - dst.y() )
     8.1 --- a/mapeditor.h	Wed Jul 16 11:56:44 2008 +0000
     8.2 +++ b/mapeditor.h	Mon Aug 04 10:43:06 2008 +0000
     8.3 @@ -28,12 +28,11 @@
     8.4  public:
     8.5  	void toggleStandardFlag(QString);
     8.6  
     8.7 -	void updateSelection();					// update geometry of selection
     8.8 +	void updateSelection();				// update geometry of selection
     8.9  
    8.10  	AttributeTable* attributeTable();
    8.11 -    void testFunction1();					// just testing new stuff
    8.12 -    void testFunction2();					// just testing new stuff
    8.13 -											// set /mainwindo/showTestMenu=true...
    8.14 +    void testFunction1();				// just testing new stuff
    8.15 +    void testFunction2();				// just testing new stuff
    8.16  
    8.17  public slots:
    8.18  	void editHeading();
    8.19 @@ -60,7 +59,7 @@
    8.20  
    8.21  private:
    8.22  	QGraphicsScene *mapScene;
    8.23 -	VymModel *model;					// Vym Map, includding several mapCenters
    8.24 +	VymModel *model;			//!< Vym Map, includding several mapCenters
    8.25  
    8.26  	bool adjustCanvasRequested;	// collect requests until end of user event
    8.27  	BranchObj *editingBO;		// entering Text into BO
     9.1 --- a/selection.cpp	Wed Jul 16 11:56:44 2008 +0000
     9.2 +++ b/selection.cpp	Mon Aug 04 10:43:06 2008 +0000
     9.3 @@ -77,7 +77,7 @@
     9.4  	selboxList.append (sb);
     9.5  	lmo->select();
     9.6  	update();
     9.7 -	mainWindow->updateSatellites (model->getMapEditor() );	
     9.8 +	mainWindow->updateSatellites (model);	
     9.9  	return true;
    9.10  }
    9.11  
    10.1 --- a/tex/vym.changelog	Wed Jul 16 11:56:44 2008 +0000
    10.2 +++ b/tex/vym.changelog	Mon Aug 04 10:43:06 2008 +0000
    10.3 @@ -1,3 +1,9 @@
    10.4 +-------------------------------------------------------------------
    10.5 +Sun Jul 27 16:37:24 CEST 2008 - uwe
    10.6 +
    10.7 +- Bugfix: Animation timer didn't stop after animation was done, which
    10.8 +          caused high load
    10.9 +
   10.10  -------------------------------------------------------------------
   10.11  Wed Jul 16 13:47:01 CEST 2008 - uwedr@suse.de
   10.12  
    11.1 --- a/version.h	Wed Jul 16 11:56:44 2008 +0000
    11.2 +++ b/version.h	Mon Aug 04 10:43:06 2008 +0000
    11.3 @@ -7,7 +7,7 @@
    11.4  #define __VYM_VERSION "1.13.0"
    11.5  //#define __VYM_CODENAME "Codename: RC-1"
    11.6  #define __VYM_CODENAME "Codename: development version"
    11.7 -#define __VYM_BUILD_DATE "2008-07-02"
    11.8 +#define __VYM_BUILD_DATE "2008-07-18"
    11.9  
   11.10  
   11.11  bool checkVersion(const QString &);
    12.1 --- a/vymmodel.cpp	Wed Jul 16 11:56:44 2008 +0000
    12.2 +++ b/vymmodel.cpp	Mon Aug 04 10:43:06 2008 +0000
    12.3 @@ -156,14 +156,7 @@
    12.4  }
    12.5  
    12.6  
    12.7 -void VymModel::setMapEditor(MapEditor *me)
    12.8 -{
    12.9 -	mapEditor=me;
   12.10 -	for (int i=0; i<mapCenters.count(); i++)
   12.11 -		mapCenters.at(i)->setMapEditor(mapEditor);
   12.12 -}
   12.13 -
   12.14 -MapEditor* VymModel::getMapEditor()
   12.15 +MapEditor* VymModel::getMapEditor()	// FIXME better return favourite editor here
   12.16  {
   12.17  	return mapEditor;
   12.18  }
   12.19 @@ -1962,7 +1955,7 @@
   12.20  
   12.21  MapCenterObj* VymModel::addMapCenter ()
   12.22  {
   12.23 -	MapCenterObj *mco=addMapCenter (QPointF(0,0));
   12.24 +	MapCenterObj *mco=addMapCenter (contextPos);
   12.25  	selection.select (mco);
   12.26  	updateActions();
   12.27  	ensureSelectionVisible();
   12.28 @@ -1970,11 +1963,8 @@
   12.29  		mco,
   12.30  		"delete()",
   12.31  		NULL,
   12.32 -		// FIXME  how to position LineEdit without contextMenuPos ?
   12.33 -		// QString ("addMapCenter (%1,%2)").arg (contextMenuPos.x()).arg(contextMenuPos.y()),
   12.34 -		// QString ("Adding MapCenter to (%1,%2").arg (contextMenuPos.x()).arg(contextMenuPos.y())
   12.35 -		QString ("addMapCenter (%1,%2)").arg (0).arg(0),
   12.36 -		QString ("Adding MapCenter to (%1,%2").arg (0).arg(0)
   12.37 +		QString ("addMapCenter (%1,%2)").arg (contextPos.x()).arg(contextPos.y()),
   12.38 +		QString ("Adding MapCenter to (%1,%2)").arg (contextPos.x()).arg(contextPos.y())
   12.39  	);	
   12.40  	return mco;	
   12.41  }
   12.42 @@ -1990,7 +1980,7 @@
   12.43  	return mapCenter;
   12.44  }
   12.45  
   12.46 -MapCenterObj *VymModel::removeMapCenter(MapCenterObj* mco)
   12.47 +MapCenterObj* VymModel::removeMapCenter(MapCenterObj* mco)
   12.48  {
   12.49  	int i=mapCenters.indexOf (mco);
   12.50  	if (i>=0)
   12.51 @@ -2002,6 +1992,15 @@
   12.52  	return NULL;
   12.53  }
   12.54  
   12.55 +MapCenterObj* VymModel::getLastMapCenter()
   12.56 +{
   12.57 +	if (mapCenters.size()>0)
   12.58 +		return mapCenters.last();
   12.59 +	else
   12.60 +		return NULL;
   12.61 +
   12.62 +}
   12.63 +
   12.64  
   12.65  BranchObj* VymModel::addNewBranchInt(int num)
   12.66  {
   12.67 @@ -3674,12 +3673,26 @@
   12.68  // View related
   12.69  //////////////////////////////////////////////
   12.70  
   12.71 -void VymModel::registerEditor(QWidget *)
   12.72 +void VymModel::registerEditor(QWidget *me)
   12.73  {
   12.74 +	mapEditor=(MapEditor*)me;
   12.75 +	for (int i=0; i<mapCenters.count(); i++)
   12.76 +		mapCenters.at(i)->setMapEditor(mapEditor);
   12.77  }
   12.78  
   12.79  void VymModel::unregisterEditor(QWidget *)
   12.80  {
   12.81 +	mapEditor=NULL;
   12.82 +}
   12.83 +
   12.84 +void VymModel::setContextPos(QPointF p)
   12.85 +{
   12.86 +	contextPos=p;
   12.87 +}
   12.88 +
   12.89 +void VymModel::unsetContextPos()
   12.90 +{
   12.91 +	contextPos=QPointF();
   12.92  }
   12.93  
   12.94  void VymModel::updateNoteFlag()
   12.95 @@ -4043,13 +4056,12 @@
   12.96  	} 
   12.97  	mapEditor->updateSelection();
   12.98  	mapScene->update();
   12.99 -	animationTimer->start();
  12.100 +	if (!animObjList.isEmpty()) animationTimer->start();
  12.101  }
  12.102  
  12.103  
  12.104 -void VymModel::startAnimation(const QPointF &start, const QPointF &dest)
  12.105 +void VymModel::startAnimation(BranchObj *bo, const QPointF &start, const QPointF &dest)
  12.106  {
  12.107 -	BranchObj *bo=getSelectedBranch();
  12.108  	if (bo && bo->getDepth()>0) 
  12.109  	{
  12.110  		AnimPoint ap;
    13.1 --- a/vymmodel.h	Wed Jul 16 11:56:44 2008 +0000
    13.2 +++ b/vymmodel.h	Mon Aug 04 10:43:06 2008 +0000
    13.3 @@ -36,7 +36,6 @@
    13.4      void init();
    13.5  	void makeTmpDirectories();		//!< create temporary directories e.g. for history
    13.6  
    13.7 -	void setMapEditor(MapEditor *me);	// FIXME should not be necessary in Model/View
    13.8  	MapEditor* getMapEditor();			// FIXME not necessary
    13.9  
   13.10  	bool isRepositionBlocked();		//!< While load or undo there is no need to update graphicsview
   13.11 @@ -303,6 +302,8 @@
   13.12  		0..n	insert at a specific position in selections parent
   13.13  		(needed for free relinking)
   13.14  	*/	
   13.15 +	MapCenterObj* getLastMapCenter();		//!< get last added MapCenter, used for context menu
   13.16 +
   13.17  private:	
   13.18      BranchObj* addNewBranchInt(int);		// pos allows to add above/below selection
   13.19  public:	
   13.20 @@ -396,6 +397,13 @@
   13.21  public:
   13.22  	void registerEditor (QWidget *);
   13.23  	void unregisterEditor (QWidget *);
   13.24 +
   13.25 +private: 
   13.26 +	QPointF contextPos;					//!< local position during context menu
   13.27 +public:
   13.28 +	void setContextPos (QPointF);		//!< local position during context menu
   13.29 +	void unsetContextPos ();			//!< forget local position after context menu
   13.30 +
   13.31  	void updateNoteFlag();				//!< Signal origination in TextEditor
   13.32      void updateRelPositions();
   13.33  
   13.34 @@ -461,7 +469,7 @@
   13.35  private slots:
   13.36  	void animate();						//!< Called by timer to animate stuff
   13.37  public:
   13.38 -	void startAnimation(const QPointF &start, const QPointF &dest);
   13.39 +	void startAnimation(BranchObj *bo, const QPointF &start, const QPointF &dest);
   13.40  	void stopAnimation(MapObj *mo);
   13.41  
   13.42  ////////////////////////////////////////////
    14.1 --- a/xml-vym.cpp	Wed Jul 16 11:56:44 2008 +0000
    14.2 +++ b/xml-vym.cpp	Mon Aug 04 10:43:06 2008 +0000
    14.3 @@ -150,8 +150,8 @@
    14.4  			// Treat the found mapcenter as a branch 
    14.5  			// in an existing map
    14.6  			LinkableMapObj* lmo=model->getSelection();
    14.7 -			if (lmo && (typeid(*lmo) == typeid(BranchObj) ) 
    14.8 -			        || (typeid(*lmo) == typeid(MapCenterObj) ) )
    14.9 +			if (lmo && ( (typeid(*lmo) == typeid(BranchObj) ) 
   14.10 +			        || (typeid(*lmo) == typeid(MapCenterObj) ) ) )
   14.11  			{
   14.12  				lastBranch=(BranchObj*)lmo;
   14.13  				if (loadMode==ImportAdd)
   14.14 @@ -207,8 +207,8 @@
   14.15  			loadMode=ImportAdd;
   14.16  			lmo=model->first();		
   14.17  		}	
   14.18 -		if (lmo && (typeid(*lmo) == typeid(BranchObj) ) 
   14.19 -				|| (typeid(*lmo) == typeid(MapCenterObj) ) )
   14.20 +		if (lmo && ( (typeid(*lmo) == typeid(BranchObj) ) 
   14.21 +				|| (typeid(*lmo) == typeid(MapCenterObj) ) ) )
   14.22  		{
   14.23  			lastBranch=(BranchObj*)(lmo);
   14.24  			if (eName=="branch")