1.6.6 Exclusive flags added
authorinsilmaril
Mon May 23 15:28:20 2005 +0000 (2005-05-23)
changeset 103c810a11d11d9
parent 102 dba9303a1a5c
child 104 270593ab83b2
1.6.6 Exclusive flags added
branchobj.cpp
demos/todo.vym
flagobj.cpp
flagobj.h
flagrowobj.cpp
flagrowobj.h
main.cpp
mainwindow.cpp
mapeditor.cpp
ornamentedobj.cpp
ornamentedobj.h
tex/vym.tex
version.h
xlinkobj.cpp
xml.cpp
     1.1 --- a/branchobj.cpp	Wed May 18 07:39:58 2005 +0000
     1.2 +++ b/branchobj.cpp	Mon May 23 15:28:20 2005 +0000
     1.3 @@ -1305,7 +1305,7 @@
     1.4  	if (!status.isEmpty()) mainWindow->statusMessage (status);
     1.5  
     1.6  	// Update Toolbar
     1.7 -	standardFlags->updateToolBar();
     1.8 +	standardFlags->updateToolbar();
     1.9  
    1.10  	// Update Browserbutton
    1.11  	if (!url.isEmpty())
    1.12 @@ -1339,7 +1339,7 @@
    1.13  	textEditor->setInactive();
    1.14  
    1.15  	// unselect all buttons in toolbar
    1.16 -	standardFlagsDefault->updateToolBar();
    1.17 +	standardFlagsDefault->updateToolbar();
    1.18  }
    1.19  
    1.20  QString BranchObj::getSelectString()
     2.1 Binary file demos/todo.vym has changed
     3.1 --- a/flagobj.cpp	Wed May 18 07:39:58 2005 +0000
     3.2 +++ b/flagobj.cpp	Mon May 23 15:28:20 2005 +0000
     3.3 @@ -30,6 +30,7 @@
     3.4  void FlagObj::init ()
     3.5  {
     3.6  	name="undefined";
     3.7 +	group="undefined";
     3.8  
     3.9  	icon=new ImageObj (canvas);
    3.10  	icon->move (absPos.x(), absPos.y() );
    3.11 @@ -41,6 +42,7 @@
    3.12  {
    3.13      MapObj::copy(other);
    3.14  	name=other->name;
    3.15 +	group=other->group;
    3.16  	tooltip=other->tooltip;
    3.17  	state=other->state;
    3.18  	icon->copy(other->icon);
    3.19 @@ -95,6 +97,16 @@
    3.20  	return name;
    3.21  }
    3.22  
    3.23 +void FlagObj::setGroup (const QString &n)
    3.24 +{
    3.25 +	group=n;
    3.26 +}
    3.27 +
    3.28 +const QString FlagObj::getGroup()
    3.29 +{
    3.30 +	return group;
    3.31 +}
    3.32 +
    3.33  void FlagObj::setToolTip(const QString &n)
    3.34  {
    3.35  	tooltip=n;
     4.1 --- a/flagobj.h	Wed May 18 07:39:58 2005 +0000
     4.2 +++ b/flagobj.h	Mon May 23 15:28:20 2005 +0000
     4.3 @@ -24,6 +24,8 @@
     4.4  	void load (const QPixmap&);
     4.5  	void setName (const QString&);
     4.6  	const QString getName ();
     4.7 +	void setGroup (const QString&);
     4.8 +	const QString getGroup();
     4.9  	void setToolTip(const QString&);
    4.10  	const QString getToolTip();
    4.11  	void setButton (QAction*);
    4.12 @@ -40,6 +42,7 @@
    4.13  	
    4.14  protected:	
    4.15  	QString name;
    4.16 +	QString group;
    4.17  	QString tooltip;
    4.18  	bool state;
    4.19  	bool used;
     5.1 --- a/flagrowobj.cpp	Wed May 18 07:39:58 2005 +0000
     5.2 +++ b/flagrowobj.cpp	Mon May 23 15:28:20 2005 +0000
     5.3 @@ -133,7 +133,7 @@
     5.4  	return false;
     5.5  }
     5.6  
     5.7 -void FlagRowObj::toggle (const QString &foname)
     5.8 +void FlagRowObj::toggle (const QString &foname, bool exclusive)
     5.9  {
    5.10  	FlagObj *fo=findFlag (foname);
    5.11  	if (fo)
    5.12 @@ -150,6 +150,11 @@
    5.13  		{
    5.14  			fo=addFlag (fo);
    5.15  			fo->activate();
    5.16 +			if (exclusive) 
    5.17 +			{
    5.18 +				deactivateGroup (fo);
    5.19 +				updateToolbar();
    5.20 +			}
    5.21  		} else
    5.22  			qWarning ("FlagRowObj ("+name+")::toggle ("+foname+")  failed - could not find it in parentRow");
    5.23  	}	
    5.24 @@ -190,6 +195,7 @@
    5.25  	}
    5.26  }
    5.27  
    5.28 +
    5.29  void FlagRowObj::deactivate (const QString &foname)
    5.30  {
    5.31  	FlagObj *fo=findFlag (foname);
    5.32 @@ -204,13 +210,23 @@
    5.33  	{
    5.34  		FlagObj *fo;
    5.35  		for (fo=flag.first();fo; fo=flag.next() )
    5.36 -		{
    5.37  			fo->deactivate();
    5.38 -		}
    5.39  	} else
    5.40  		qWarning ("FlagRowObj::deactivateAll mustn't be called for ordinary rows");
    5.41  }
    5.42  
    5.43 +void FlagRowObj::deactivateGroup (FlagObj *keepfo)
    5.44 +{
    5.45 +	// deactivate all flags in keepof, but keep keepfo [sic!]
    5.46 +	if (keepfo)
    5.47 +	{
    5.48 +		FlagObj *fo;
    5.49 +		for (fo=flag.first();fo; fo=flag.next() )
    5.50 +			if (keepfo->getGroup()==fo->getGroup() && keepfo!=fo) 
    5.51 +				flag.remove(fo);
    5.52 +	}	
    5.53 +}
    5.54 +
    5.55  void FlagRowObj::setEnabled (bool b)
    5.56  {
    5.57  	// If we have no parent, we are the default FlagRowObj
    5.58 @@ -262,6 +278,7 @@
    5.59  
    5.60  void FlagRowObj::makeToolbar (QMainWindow *w, const QString &n)
    5.61  {
    5.62 +	//Only make toolbar for the parentrow, not each row in branches
    5.63  	if (!parentRow)
    5.64  	{
    5.65  		// create bar and buttons
    5.66 @@ -291,7 +308,7 @@
    5.67  		qWarning ("FlagRowObj::makeToolbar mustn't be called for ordinary rows");
    5.68  }
    5.69  
    5.70 -void  FlagRowObj::updateToolBar()
    5.71 +void  FlagRowObj::updateToolbar()
    5.72  {
    5.73  	FlagObj *fo;
    5.74  	if (parentRow)
    5.75 @@ -301,7 +318,7 @@
    5.76  		// In parentRow activate all existing (==active) flags
    5.77  		for (fo=flag.first();fo; fo=flag.next() ) 
    5.78  			parentRow->activate(fo->getName());
    5.79 -		parentRow->updateToolBar();	
    5.80 +		parentRow->updateToolbar();	
    5.81  	} else
    5.82  	{
    5.83  		// We are the toolbar default
     6.1 --- a/flagrowobj.h	Wed May 18 07:39:58 2005 +0000
     6.2 +++ b/flagrowobj.h	Mon May 23 15:28:20 2005 +0000
     6.3 @@ -22,16 +22,17 @@
     6.4      virtual void calcBBoxSize();
     6.5  	virtual QString getFlagName (const QPoint &p);	// Find flag by position
     6.6  	bool isActive(const QString&);
     6.7 -	void toggle (const QString&);
     6.8 +	void toggle (const QString&,bool);
     6.9  	void activate(const QString&);
    6.10  	void deactivate(const QString&);
    6.11  	void deactivateAll();
    6.12 +	void deactivateGroup(FlagObj *);
    6.13  	void setEnabled (bool);
    6.14  	void resetUsedCounter();
    6.15  	QString saveToDir (const QString &,const QString &,bool);
    6.16  	void setName (const QString&);			// prefix for exporting flags to dir
    6.17  	void makeToolbar (QMainWindow*, const QString &);	// Create Toolbar buttons
    6.18 -	void updateToolBar();					// Update Toolbar buttons	
    6.19 +	void updateToolbar();					// Update Toolbar buttons	
    6.20  private:	
    6.21  	FlagRowObj* parentRow;					// look for flags in this row
    6.22  	FlagObj* findFlag (const QString&);
     7.1 --- a/main.cpp	Wed May 18 07:39:58 2005 +0000
     7.2 +++ b/main.cpp	Mon May 23 15:28:20 2005 +0000
     7.3 @@ -91,6 +91,7 @@
     7.4  QAction *actionSettingsPasteNewHeading;
     7.5  QAction *actionSettingsAutoedit;
     7.6  QAction *actionSettingsUseDelKey;
     7.7 +QAction *actionSettingsUseFlagGroups;
     7.8  
     7.9  QPopupMenu *branchContextMenu;
    7.10  QPopupMenu *branchAddContextMenu;
     8.1 --- a/mainwindow.cpp	Wed May 18 07:39:58 2005 +0000
     8.2 +++ b/mainwindow.cpp	Mon May 23 15:28:20 2005 +0000
     8.3 @@ -129,6 +129,7 @@
     8.4  extern QAction* actionSettingsAutoselectText;
     8.5  extern QAction* actionSettingsPasteNewHeading;
     8.6  extern QAction* actionSettingsUseDelKey;
     8.7 +extern QAction* actionSettingsUseFlagGroups;
     8.8  
     8.9  extern QPopupMenu* branchContextMenu;
    8.10  extern QPopupMenu* branchAddContextMenu;
    8.11 @@ -253,6 +254,7 @@
    8.12  	settings.writeEntry( "/vym/mapeditor/editmode/pastenewheading",actionSettingsPasteNewHeading->isOn() );
    8.13  	settings.writeEntry( "/vym/mapeditor/editmode/autoedit",actionSettingsAutoedit->isOn() );
    8.14  	settings.writeEntry( "/vym/mapeditor/editmode/useDelKey",actionSettingsUseDelKey->isOn() );
    8.15 +	settings.writeEntry( "/vym/mapeditor/editmode/useFlagGroups",actionSettingsUseFlagGroups->isOn() );
    8.16  
    8.17  	QString s;
    8.18  	int maps=lastMaps.count();
    8.19 @@ -517,8 +519,6 @@
    8.20  	actionEditHeading=a;
    8.21      a = new QAction( tr( "edit Heading" ),tr( "Edit heading" ), Key_F2, this, "editHeading" );
    8.22      connect( a, SIGNAL( activated() ), this, SLOT( editHeading() ) );
    8.23 -    a = new QAction( tr( "edit Heading" ),tr( "Edit heading" ), Key_E, this, "editHeading" );
    8.24 -    connect( a, SIGNAL( activated() ), this, SLOT( editHeading() ) );
    8.25  	a->setEnabled (false);
    8.26      a->addTo ( menu );
    8.27  	actionEditHeading=a;
    8.28 @@ -834,6 +834,12 @@
    8.29  	a->setOn ( settings.readBoolEntry ("/vym/mapeditor/editmode/useDelKey",false) );
    8.30      a->addTo( menu );
    8.31  	actionSettingsUseDelKey=a;
    8.32 +
    8.33 +    a= new QAction( tr( "Use groups in flag toolbars" ), QPixmap(), tr( "Enable flag groups" ), 0, this, "flaggroups" );
    8.34 +	a->setToggleAction(true);
    8.35 +	a->setOn ( settings.readBoolEntry ("/vym/mapeditor/editmode/useFlagGroups",true) );
    8.36 +    a->addTo( menu );
    8.37 +	actionSettingsUseFlagGroups=a;
    8.38  }
    8.39  
    8.40  // Test Actions
    8.41 @@ -964,7 +970,8 @@
    8.42  
    8.43      a = new QAction( tr( "Export as ASCII (still experimental)" ), QPixmap(), tr( "Export (ASCII)" ), 0, this, "exportASCII" );
    8.44      connect( a, SIGNAL( activated() ), this, SLOT( fileExportASCII() ) );
    8.45 -    a->addTo( exportMenu );
    8.46 +	// FIXME deactivated, doesn't work with QRichtext anyway
    8.47 +	//   a->addTo( exportMenu );
    8.48  
    8.49  	a = new QAction( tr( "Export XML" ), QPixmap(), tr( "Export XML" ),  0, this, "exportXML" );
    8.50      connect( a, SIGNAL( activated() ), this, SLOT( fileExportXML() ) );
    8.51 @@ -2307,8 +2314,12 @@
    8.52  void Main::helpDoc()
    8.53  {
    8.54  	QString docpath;
    8.55 -	// default path in SUSE LINUX
    8.56 -	docpath="/usr/share/doc/packages/vym/doc/vym.pdf";
    8.57 +	#if defined(Q_OS_MACX)
    8.58 +		docpath="./vym.app/Contents/vym.pdf";
    8.59 +	#else
    8.60 +		// default path in SUSE LINUX
    8.61 +		docpath="/usr/share/doc/packages/vym/doc/vym.pdf";
    8.62 +	#endif
    8.63  
    8.64  	if (!QFile (docpath).exists() )
    8.65  	{
     9.1 --- a/mapeditor.cpp	Wed May 18 07:39:58 2005 +0000
     9.2 +++ b/mapeditor.cpp	Mon May 23 15:28:20 2005 +0000
     9.3 @@ -121,6 +121,7 @@
     9.4  extern QAction *actionSettingsAutoselectHeading;
     9.5  extern QAction *actionSettingsAutoselectText;
     9.6  extern QAction *actionSettingsPasteNewHeading;
     9.7 +extern QAction *actionSettingsUseFlagGroups;
     9.8  
     9.9  extern QPopupMenu *branchContextMenu;
    9.10  extern QPopupMenu *branchLinksContextMenu;
    9.11 @@ -193,22 +194,26 @@
    9.12  
    9.13  		FlagObj *fo = new FlagObj (mapCanvas);
    9.14  		fo->load(QPixmap(flag_exclamationmark_xpm));
    9.15 -		fo->setName("exclamationmark");
    9.16 +		fo->setName ("exclamationmark");
    9.17 +		fo->setGroup("standard-mark");
    9.18  		fo->setToolTip(tr("Take care!","Standardflag"));
    9.19  		standardFlagsDefault->addFlag (fo);	// makes deep copy
    9.20  		
    9.21  		fo->load(QPixmap(flag_questionmark_xpm));
    9.22  		fo->setName("questionmark");
    9.23 +		fo->setGroup("standard-mark");
    9.24  		fo->setToolTip(tr("Really?","Standardflag"));
    9.25  		standardFlagsDefault->addFlag (fo);	
    9.26  
    9.27  		fo->load(QPixmap(flag_hook_green_xpm));
    9.28  		fo->setName("hook-green");
    9.29 +		fo->setGroup("standard-hook");
    9.30  		fo->setToolTip(tr("ok!","Standardflag"));
    9.31  		standardFlagsDefault->addFlag (fo);	
    9.32  
    9.33  		fo->load(QPixmap(flag_cross_red_xpm));
    9.34  		fo->setName("cross-red");
    9.35 +		fo->setGroup("standard-hook");
    9.36  		fo->setToolTip(tr("Not ok!","Standardflag"));
    9.37  		standardFlagsDefault->addFlag (fo);	
    9.38  
    9.39 @@ -219,11 +224,13 @@
    9.40  
    9.41  		fo->load(QPixmap(flag_smiley_good_xpm));
    9.42  		fo->setName("smiley-good");
    9.43 +		fo->setGroup("standard-smiley");
    9.44  		fo->setToolTip(tr("Good","Standardflag"));
    9.45  		standardFlagsDefault->addFlag (fo);	
    9.46  
    9.47  		fo->load(QPixmap(flag_smiley_sad_xpm));
    9.48  		fo->setName("smiley-sad");
    9.49 +		fo->setGroup("standard-smiley");
    9.50  		fo->setToolTip(tr("Bad","Standardflag"));
    9.51  		standardFlagsDefault->addFlag (fo);	
    9.52  
    9.53 @@ -239,21 +246,26 @@
    9.54  
    9.55  		fo->load(QPixmap(flag_arrow_up_xpm));
    9.56  		fo->setName("arrow-up");
    9.57 +		fo->setGroup("standard-arrow");
    9.58  		fo->setToolTip(tr("Important","Standardflag"));
    9.59  		standardFlagsDefault->addFlag (fo);	
    9.60  
    9.61  		fo->load(QPixmap(flag_arrow_down_xpm));
    9.62  		fo->setName("arrow-down");
    9.63 +		fo->setGroup("standard-arrow");
    9.64  		fo->setToolTip(tr("Unimportant","Standardflag"));
    9.65  		standardFlagsDefault->addFlag (fo);	
    9.66  
    9.67  		fo->load(QPixmap(flag_thumb_up_xpm));
    9.68  		fo->setName("thumb-up");
    9.69 +		fo->setGroup("standard-thumb");
    9.70  		fo->setToolTip(tr("I like this","Standardflag"));
    9.71  		standardFlagsDefault->addFlag (fo);	
    9.72  
    9.73  		fo->load(QPixmap(flag_thumb_down_xpm));
    9.74  		fo->setName("thumb-down");
    9.75 +		fo->setGroup("standard-thumb");
    9.76 +		fo->setToolTip(tr("I like this","Standardflag"));
    9.77  		fo->setToolTip(tr("I do not like this","Standardflag"));
    9.78  		standardFlagsDefault->addFlag (fo);	
    9.79  		
    9.80 @@ -549,7 +561,6 @@
    9.81  
    9.82  	if (writeflags)
    9.83  		standardFlagsDefault->saveToDir (tmpdir+"/flags/","",writeflags);
    9.84 -	
    9.85  	return s;
    9.86  }
    9.87  
    9.88 @@ -1996,7 +2007,7 @@
    9.89  	{
    9.90  		setChanged();
    9.91  		saveState(PartOfMap,selection);	
    9.92 -		((BranchObj*)(selection))->toggleStandardFlag (f);
    9.93 +		((BranchObj*)(selection))->toggleStandardFlag (f,actionSettingsUseFlagGroups);
    9.94  	}	
    9.95  }
    9.96  
    9.97 @@ -2235,6 +2246,7 @@
    9.98  	uint b=0;
    9.99  	uint f=0;
   9.100  	uint n=0;
   9.101 +	uint xl=0;
   9.102  	BranchObj *bo;
   9.103  	bo=mapCenter->first();
   9.104  	while (bo) 
   9.105 @@ -2242,9 +2254,11 @@
   9.106  		if (!bo->getNote().isEmpty() ) n++;
   9.107  		f+= bo->countFloatImages();
   9.108  		b++;
   9.109 +		xl+=bo->countXLinks();
   9.110  		bo=bo->next();
   9.111  	}
   9.112      stats+=QString ("%1 branches\n").arg (b-1,6);
   9.113 +    stats+=QString ("%1 xLinks \n").arg (xl-1,6);
   9.114      stats+=QString ("%1 notes\n").arg (n,6);
   9.115      stats+=QString ("%1 images\n").arg (f,6);
   9.116  	dia.setStats (stats);
   9.117 @@ -2346,7 +2360,10 @@
   9.118  
   9.119  			actionEditCopy->setEnabled (true);	
   9.120  			actionEditCut->setEnabled (true);	
   9.121 -			actionEditPaste->setEnabled (true);	
   9.122 +			if (clipboardME->getMapCenter()->countBranches()>0)
   9.123 +				actionEditPaste->setEnabled (true);	
   9.124 +			else	
   9.125 +				actionEditPaste->setEnabled (false);	
   9.126  			for (a=actionListBranches.first();a;a=actionListBranches.next())
   9.127  				a->setEnabled(true);
   9.128  			actionEditDelete->setEnabled (true);
   9.129 @@ -2668,6 +2685,7 @@
   9.130  					QMessageBox::critical (0,tr("Critical Import Error"),tr("Cannot find the directory"));
   9.131  				else 
   9.132  				{
   9.133 +					// Recursively add subdirs
   9.134  					importDir (bo,d);
   9.135  					d.cdUp();
   9.136  				}
   9.137 @@ -2685,6 +2703,9 @@
   9.138  			bo=dst->getLastBranch();
   9.139  			bo->setHeading (fi->fileName() );
   9.140  			bo->setColor (QColor("black"),false);
   9.141 +			if (fi->fileName().right(4) == ".vym" )
   9.142 +				bo->setVymLink (fi->filePath());
   9.143 +
   9.144  			++itfile;
   9.145  		}	
   9.146  	}		
    10.1 --- a/ornamentedobj.cpp	Wed May 18 07:39:58 2005 +0000
    10.2 +++ b/ornamentedobj.cpp	Mon May 23 15:28:20 2005 +0000
    10.3 @@ -174,9 +174,9 @@
    10.4      return note.getNote();
    10.5  }
    10.6  
    10.7 -void OrnamentedObj::toggleStandardFlag(QString f)
    10.8 +void OrnamentedObj::toggleStandardFlag(QString f, bool exclusive)
    10.9  {
   10.10 -	standardFlags->toggle(f);
   10.11 +	standardFlags->toggle(f,exclusive);
   10.12  	calcBBoxSize();
   10.13  	positionBBox();
   10.14  	move (absPos.x(), absPos.y() );
    11.1 --- a/ornamentedobj.h	Wed May 18 07:39:58 2005 +0000
    11.2 +++ b/ornamentedobj.h	Mon May 23 15:28:20 2005 +0000
    11.3 @@ -30,7 +30,7 @@
    11.4      virtual void setNote(QString);			// set note
    11.5      virtual void setNote(NoteObj);			// set note
    11.6      virtual QString getNote();				// returns note	
    11.7 -	virtual void toggleStandardFlag(QString);
    11.8 +	virtual void toggleStandardFlag(QString, bool);
    11.9  	virtual void activateStandardFlag(QString);
   11.10  	virtual QString getSystemFlagName (const QPoint &p);
   11.11  
    12.1 --- a/tex/vym.tex	Wed May 18 07:39:58 2005 +0000
    12.2 +++ b/tex/vym.tex	Mon May 23 15:28:20 2005 +0000
    12.3 @@ -168,17 +168,18 @@
    12.4  
    12.5  Select the mapcenter "New map" in the middle of the mapeditor by
    12.6  left-clicking with the mouse. It will turn yellow to show that is
    12.7 -selected. There are two ways to add a new branch to the center:
    12.8 +selected. There are several ways to add a new branch to the center:
    12.9  \begin{itemize}
   12.10 -	\item Main menu on top of mapeditor window:
   12.11 -	Edit \ra Add new Branch
   12.12 -	\item Press \key{Ins}
   12.13 +	\item Using the mouse: Open the context meny by clicking with the
   12.14 +	right mouse button (CTRL-Click on Mac) onto the
   12.15 +	mapcenter and choose Add \ra Add as child
   12.16 +	\item Press \key{Ins} or \key{A}
   12.17  \end{itemize}
   12.18  A new branch will appear and you will be able to type the heading of the
   12.19  branch. Finish adding the new branch by pressing \key{Enter}.
   12.20  %tipp
   12.21  Sometimes it comes handy to add a new branch above or below the current
   12.22 -one. Use \key{Ins} together with \key{Shift} or \key{Ctrl}.
   12.23 +one. Use \key{Ins} together with \key{Shift} or \key{Ctrl}. 
   12.24  
   12.25  \subsection{Navigate through a map}
   12.26  \subsubsection*{Select branches}
   12.27 @@ -236,7 +237,7 @@
   12.28  
   12.29  To scroll or unscroll a branch and its childs, press the
   12.30  \begin{itemize}
   12.31 -	\item \key{Scroll} key or
   12.32 +	\item \key{Scroll} key or  \key{S}
   12.33  	\item press the middle-mouse button or
   12.34  	\item choose the little scroll from the toolbar.
   12.35  \end{itemize}
   12.36 @@ -713,14 +714,17 @@
   12.37  \begin{longtable}{|lcp{8cm}l|} \hline
   12.38  Version	&	&	Comment								& Date	\\ \hline \hline \endhead
   12.39  	\hline \endfoot
   12.40 -1.6.5	& -	&	removing a branch and keeping its childs	& 2005-05-03 \\
   12.41 +1.6.6	& -	&	Exclusive standard flags			& 2005-05-23 \\
   12.42 +1.6.5	& -	&	removing a branch and keeping its childs	& 2005-05-19 \\
   12.43          & -	&	removing childs of a branch			& \\
   12.44          & -	&	insert branch and make selection its child& \\
   12.45          & -	&	restructured branch context menu	& \\
   12.46  				in a basic version (straight line)	& 2005-04-15\\
   12.47 +        & -	&	New shortcuts  for use on Mac OS X	& \\
   12.48 +        & -	&	Importing directories generates vymlinks now & \\
   12.49          & -	&	Bugfix: Changing linkstyle now automatically redraws all
   12.50  				links again& \\
   12.51 -        & -	&	New shortcuts (F1-F3) for use on Mac OS X& \\
   12.52 +        & -	&	Bugfix: Paste icon is disabled if clipboard is empty &\\
   12.53  1.6.4	& -	&	xLinks (arbitrary connection between 2 branches) works
   12.54  				in a basic version (straight line)	& 2005-04-15\\
   12.55  1.6.3	& -	&	Bugfix: Saving of selection to a vym part (.vyp)	&2005-03-30\\
    13.1 --- a/version.h	Wed May 18 07:39:58 2005 +0000
    13.2 +++ b/version.h	Mon May 23 15:28:20 2005 +0000
    13.3 @@ -1,7 +1,7 @@
    13.4  #ifndef VERSION_H 
    13.5  #define VERSION_H
    13.6  
    13.7 -#define __VYM_VERSION__ "1.6.5"
    13.8 -#define __BUILD_DATE__ "May 17, 2005"
    13.9 +#define __VYM_VERSION__ "1.6.6"
   13.10 +#define __BUILD_DATE__ "May 23, 2005"
   13.11  
   13.12  #endif
    14.1 --- a/xlinkobj.cpp	Wed May 18 07:39:58 2005 +0000
    14.2 +++ b/xlinkobj.cpp	Mon May 23 15:28:20 2005 +0000
    14.3 @@ -88,6 +88,7 @@
    14.4  
    14.5  int XLinkObj::getWidth()
    14.6  {
    14.7 +	cout << "XLO  w="<<width<<endl;
    14.8  	return width;
    14.9  }
   14.10  
   14.11 @@ -112,10 +113,15 @@
   14.12  {
   14.13  	if (beginBranch && endBranch)
   14.14  	{
   14.15 +		if (beginBranch==endBranch)
   14.16 +		{	//FIXME debugging
   14.17 +			cout << "XLO::activate  b=e="<<beginBranch->getHeading()<<endl;
   14.18 +			return false;
   14.19 +		}
   14.20  		xLinkState=activeXLink;
   14.21  		beginBranch->addXLink (this);
   14.22  		endBranch->addXLink (this);
   14.23 -		setVisibility (true);
   14.24 +		setVisibility ();
   14.25  		return true;
   14.26  	} else
   14.27  		return false;
   14.28 @@ -266,17 +272,27 @@
   14.29  
   14.30  QString XLinkObj::saveToDir ()
   14.31  {
   14.32 -	QString s;
   14.33 -	if (beginBranch && endBranch)
   14.34 +	QString s="";
   14.35 +	if (beginBranch && endBranch &&xLinkState==activeXLink)
   14.36  	{
   14.37 -		QString colAttr=attribut ("color",color.name());
   14.38 -		QString widAttr=attribut ("width",QString().setNum(width,10));
   14.39 -		QString begSelAttr=attribut ("beginBranch",beginBranch->getSelectString());
   14.40 -		QString endSelAttr=attribut ("endBranch",  endBranch->getSelectString());
   14.41 -		s=beginElement ("xlink", colAttr +widAttr +begSelAttr +endSelAttr);
   14.42 +		if (beginBranch==endBranch && xLinkState)
   14.43 +		{
   14.44 +			//FIXME testing
   14.45 +			//cout << "   identical ends: "<<beginBranch->getSelectString()<<endl;
   14.46 +			s="";
   14.47 +		} else
   14.48 +		{
   14.49 +			QString colAttr=attribut ("color",color.name());
   14.50 +			QString widAttr=attribut ("width",QString().setNum(width,10));
   14.51 +			QString begSelAttr=attribut ("beginBranch",beginBranch->getSelectString());
   14.52 +			QString endSelAttr=attribut ("endBranch",  endBranch->getSelectString());
   14.53 +			s=beginElement ("xlink", colAttr +widAttr +begSelAttr +endSelAttr);
   14.54  
   14.55 -		s+=endElement ("xlink");
   14.56 +			s+=endElement ("xlink");
   14.57 +		}
   14.58  	}
   14.59 +	//FIXME testing
   14.60 +	//cout << s<<endl;
   14.61  	return s;
   14.62  }
   14.63  
    15.1 --- a/xml.cpp	Wed May 18 07:39:58 2005 +0000
    15.2 +++ b/xml.cpp	Mon May 23 15:28:20 2005 +0000
    15.3 @@ -523,6 +523,7 @@
    15.4  {
    15.5  	QColor col;
    15.6  	bool okx;
    15.7 +	bool success=false;
    15.8  	XLinkObj *xlo=new XLinkObj (mc->getCanvas());
    15.9  	if (!a.value( "color").isEmpty() ) 
   15.10  	{
   15.11 @@ -548,13 +549,13 @@
   15.12  				{
   15.13  					xlo->setEnd ((BranchObj*)(lmo));
   15.14  					xlo->activate();
   15.15 -					return true;
   15.16  				}
   15.17  			}
   15.18 -			return true;	// Not all branches there yet, no error
   15.19 +			success=true; // Not all branches there yet, no error
   15.20  		}           
   15.21  	}	
   15.22 -	return false; 
   15.23 +	delete (xlo);
   15.24 +	return success;
   15.25  }
   15.26  
   15.27  bool mapBuilderHandler::readHtmlAttr (const QXmlAttributes& a)