# HG changeset patch
# User insilmaril
# Date 1125921391 0
# Node ID 72cc3873306a565fb45c85d9c562401470088e27
# Parent  e44baadd495854431e2cab9df8f0b54084d18338
Version 1.7.4, various bugfixes

diff -r e44baadd4958 -r 72cc3873306a aboutdialog.cpp
--- a/aboutdialog.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/aboutdialog.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -25,6 +25,7 @@
 	"<h3><center><img src=\"vym_logo\">VYM - View Your Mind </h3>"
 	"<p align=\"center\"> A tool to put the things you have got in your mind into a map.</p>"
 	"<p align=\"center\"> (c) by Uwe Drechsel (<a href=\"mailto:vym@InSilmaril.de\">vym@InSilmaril.de</a>)</p>"
+	"<p align=\"center\"> Version " __VYM_VERSION__" - " __BUILD_DATE__"</p>"
 	"<ul>"
 	"<li> Contact</li>"
 		"<ul>"
diff -r e44baadd4958 -r 72cc3873306a branchobj.cpp
--- a/branchobj.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/branchobj.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -743,6 +743,8 @@
 	else
 		posAttr="";
 
+	QString linkAttr=getLinkAttr();
+
 	QString urlAttr;
 	if (!url.isEmpty())
 		urlAttr=attribut ("url",url);
@@ -770,11 +772,11 @@
 	} else
 		areaAttr="";
 	
-    s=beginElement ("branch" +scrolledAttr +posAttr +urlAttr +vymLinkAttr +frameAttr +areaAttr );
+    s=beginElement ("branch" +scrolledAttr +posAttr +linkAttr +urlAttr +vymLinkAttr +frameAttr +areaAttr );
     incIndent();
 
 	// save heading
-    s=s+valueElement("heading", getHeading(),
+    s+=valueElement("heading", getHeading(),
 		attribut ("textColor",QColor(heading->getColor()).name()));
 
 	// save names of flags set
@@ -1302,6 +1304,15 @@
 
 void BranchObj::select()
 {
+	// set Text in Editor	
+	textEditor->setText(note.getNote() );
+	QString fnh=note.getFilenameHint();
+	if (fnh!="")
+		textEditor->setFilenameHint(note.getFilenameHint() );
+	else	
+		textEditor->setFilenameHint(getHeading() );
+	textEditor->setFontHint (note.getFontHint() );
+
     LinkableMapObj::select();
 	// Tell parent that I am selected now:
 	BranchObj* po=(BranchObj*)(parObj);
@@ -1311,17 +1322,6 @@
 	// temporary unscroll, if we have scrolled parents somewhere
 	if (parObj) ((BranchObj*)(parObj))->tmpUnscroll();
 
-	// set Text in Editor	
-	textEditor->setText(note.getNote() );
-	QString fnh=note.getFilenameHint();
-	if (fnh!="")
-		textEditor->setFilenameHint(note.getFilenameHint() );
-	else	
-		textEditor->setFilenameHint(getHeading() );
-	textEditor->setFontHint (note.getFontHint() );
-	connect (textEditor, SIGNAL (textHasChanged() ), this, SLOT (updateNoteFlag() ) ); 
-	connect (textEditor, SIGNAL (fontSizeHasChanged() ), this, SLOT (updateNoteFlag() ) ); 
-
 	// Show URL and link in statusbar
 	QString status;
 	if (!url.isEmpty()) status+="URL: "+url+"  ";
@@ -1355,10 +1355,6 @@
 	// reset temporary unscroll, if we have scrolled parents somewhere
 	if (parObj) ((BranchObj*)(parObj))->resetTmpUnscroll();
 
-	// Disconnect textEditor from this LMO
-	disconnect( textEditor, SIGNAL(textHasChanged()), 0, 0 );
-	disconnect( textEditor, SIGNAL (fontSizeHasChanged()),0,0 ); 
-
 	// Erase content of editor 
 	textEditor->setInactive();
 
diff -r e44baadd4958 -r 72cc3873306a demos/todo.vym
Binary file demos/todo.vym has changed
diff -r e44baadd4958 -r 72cc3873306a exports.cpp
--- a/exports.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/exports.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -35,7 +35,8 @@
 	// Main loop over all branches
 	QString s;
 	QString actIndent("");
-	uint i;
+	int i;
+	uint j;
 	BranchObj *bo;
 	bo=mapCenter->first();
 	while (bo) 
@@ -48,7 +49,7 @@
 		if (bo->getDepth()==0)
 		{
 			ts << (bo->getHeading()+ "\n");
-			for (i=0;i<bo->getHeading().length();i++) ts<<"=";
+			for (j=0;j<bo->getHeading().length();j++) ts<<"=";
 			ts << "\n";
 		} else 	if (bo->getDepth()==1)
 			ts << ("\n"+getSectionString(bo) + bo->getHeading()+ "\n");
diff -r e44baadd4958 -r 72cc3873306a floatobj.cpp
--- a/floatobj.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/floatobj.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -42,6 +42,8 @@
 	useOrientation=true;
 	floatExport=true;
 	zPlane=Z_ICON;
+	setLinkStyle (StyleParabel);
+	setHideLinkUnselected(true);
 }
 
 void FloatObj::copy (FloatObj* other)
diff -r e44baadd4958 -r 72cc3873306a linkablemapobj.cpp
--- a/linkablemapobj.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/linkablemapobj.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -91,6 +91,8 @@
     selbox->hide();
     selected=false;
 
+	hideLinkUnselected=false;
+
 	// initialize frame
 	frame = new FrameObj (canvas);
 	
@@ -258,6 +260,18 @@
 	return style;
 }
 
+void LinkableMapObj::setHideLinkUnselected(bool b)
+{
+	hideLinkUnselected=b;
+	setVisibility (visible);
+	updateLink();
+}
+
+bool LinkableMapObj::getHideLinkUnselected()
+{
+	return hideLinkUnselected;
+}
+
 void LinkableMapObj::setLinkPos(LinkPos lp)
 {
 	linkpos=lp;
@@ -302,7 +316,6 @@
 		default:
 			break;
 	} // switch (style)	
-	//FIXME updateLink();
 }
 
 QColor LinkableMapObj::getLinkColor()
@@ -333,32 +346,60 @@
 
 void LinkableMapObj::setVisibility (bool v)
 {
+	QCanvasLine* cl;
 	MapObj::setVisibility (v);
-	if (visible) 
+	bool visnow=visible;
+	if (hideLinkUnselected && !selected)
+		visnow=false;
+
+	if (visnow) 
 	{
 		bottomline->show();
-		// FIXME lines and segments should be done in LMO?
-		if (style==StyleLine && l) 
+		switch (style)
 		{
-			l->show();
-		} else
-		{
-			QCanvasLine* cl;
-			for (cl=segment.first(); cl; cl=segment.next() )
-				cl->show();
-		} 
+			case StyleLine:
+				if (l) l->show();
+				break;
+			case StyleParabel:	
+				for (cl=segment.first(); cl; cl=segment.next() )
+					cl->show();
+				break;	
+			case StylePolyLine:
+				if (p) p->show();
+				if (l) l->show();
+				break;
+			case StylePolyParabel:	
+				for (cl=segment.first(); cl; cl=segment.next() )
+					cl->show();
+				if (p) p->show();
+				break;
+			default:
+				break;
+		}
 	} else 
 	{
 		bottomline->hide();
-		if (style==StyleLine && l) 
+		switch (style)
 		{
-			l->hide();
-		} else
-		{
-			QCanvasLine* cl;
-			for (cl=segment.first(); cl; cl=segment.next() )
-				cl->hide();
-		} 
+			case StyleLine:
+				if (l) l->hide();
+				break;
+			case StyleParabel:	
+				for (cl=segment.first(); cl; cl=segment.next() )
+					cl->hide();
+				break;	
+			case StylePolyLine:
+				if (p) p->hide();
+				if (l) l->hide();
+				break;
+			case StylePolyParabel:	
+				for (cl=segment.first(); cl; cl=segment.next() )
+					cl->hide();
+				if (p) p->hide();
+				break;
+			default:
+				break;
+		}
 	}	
 }
 
@@ -681,6 +722,7 @@
 	setSelBox();
     selected=true;
     selbox->show();
+	setVisibility (visible);
 }
 
 
@@ -688,6 +730,7 @@
 {
     selected=false;
     selbox->hide();
+	setVisibility (visible);
 }
 
 void LinkableMapObj::parabel (QPointArray &ya, double p1x, double p1y, double p2x, double p2y)
@@ -719,3 +762,15 @@
 	}	
 }
 
+QString LinkableMapObj::getLinkAttr ()
+{
+	QString hideAttr;
+	if (hideLinkUnselected)
+		// Since this is currently the
+		// only attribut and it is switched off by default
+		// don't write <link>  at all if it is missing
+		return attribut ("hideLinkUnselected","true");
+	else
+		return "";
+	
+}
diff -r e44baadd4958 -r 72cc3873306a linkablemapobj.h
--- a/linkablemapobj.h	Thu Sep 01 15:35:18 2005 +0000
+++ b/linkablemapobj.h	Mon Sep 05 11:56:31 2005 +0000
@@ -36,6 +36,8 @@
 	LinkStyle getDefLinkStyle();
     void setLinkStyle(LinkStyle);            
 	LinkStyle getLinkStyle();
+	void setHideLinkUnselected(bool);
+	bool getHideLinkUnselected();
 	void setLinkPos (LinkPos);
 	LinkPos getLinkPos ();
 
@@ -79,6 +81,8 @@
 
 protected:
 	void parabel(QPointArray &,double,double,double,double);	// Create Parabel connecting two points
+	QString getLinkAttr();
+
     QPoint childPos;
     QPoint parPos;
 	bool link2ParPos;				// While moving around, sometimes link to parent
@@ -94,7 +98,7 @@
     int offset;                     // vertical offset of dockpos to pos
 
 	int thickness_start;			// for StylePoly*	
-    LinkStyle style;
+    LinkStyle style;				// Current style
 	LinkPos linkpos;
     QColor linkcolor;               // Link color
     QCanvasLine* l;                 // line style
@@ -108,6 +112,7 @@
 	bool repositionRequest;			// 
 
 	bool selected;					// Used for marking the selection
+	bool hideLinkUnselected;		// to hide links if unselected
 	QCanvasRectangle* selbox;
 	FrameObj *frame;				// frame around object
 };
diff -r e44baadd4958 -r 72cc3873306a main.cpp
--- a/main.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/main.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -81,6 +81,7 @@
 QAction *actionFormatFrameRectangle;
 
 QActionGroup *actionGroupFormatLinkStyles;
+QAction *actionFormatHideLinkUnselected;
 QAction *actionFormatLinkStyleLine;
 QAction *actionFormatLinkStyleParabel;
 QAction *actionFormatLinkStylePolyLine;
diff -r e44baadd4958 -r 72cc3873306a mainwindow.cpp
--- a/mainwindow.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/mainwindow.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -121,6 +121,7 @@
 extern QAction *actionFormatLinkStyleParabel;
 extern QAction *actionFormatLinkStylePolyLine;
 extern QAction *actionFormatLinkStylePolyParabel;
+extern QAction *actionFormatHideLinkUnselected;
 
 extern QAction *actionViewToggleNoteEditor;
 
@@ -234,6 +235,10 @@
 	connect (findWindow, SIGNAL( somethingChanged() ), 
 		this, SLOT(editFindChanged() ) );	
 
+	// FIXME testing
+	// Connect TextEditor, so that we can update flags if text changes
+	connect (textEditor, SIGNAL (textHasChanged() ), this, SLOT (updateNoteFlag()));
+
 	updateGeometry();
 
 	// Creating  the default map into first tab is done in main.cpp now...
@@ -453,21 +458,18 @@
 
 	a = new QAction( tr( "Open URL" ), QPixmap(flag_url_xpm), tr( "Open URL" ), CTRL + Key_U, this, "url" );
     connect( a, SIGNAL( activated() ), this, SLOT( editOpenURL() ) );
-    a->addTo( menu );
     a->addTo( tb );
 	a->setEnabled (false);
 	actionEditOpenURL=a;
 
 	a = new QAction( tr( "Edit URL" ), QPixmap(), tr( "Edit URL"+QString("...") ), SHIFT + CTRL + Key_U, this, "url" );
     connect( a, SIGNAL( activated() ), this, SLOT( editURL() ) );
-    a->addTo( menu );
 	a->setEnabled (false);
 	actionListBranches.append(a);
 	actionEditURL=a;
 	
 	a = new QAction( tr( "Use heading of selected branch as URL" ), QPixmap(), tr( "Use heading for URL" ), 0, this, "heading2url" );
     connect( a, SIGNAL( activated() ), this, SLOT( editHeading2URL() ) );
-    a->addTo( menu );
 	a->setEnabled (false);
 	actionListBranches.append(a);
 	actionEditHeading2URL=a;
@@ -478,33 +480,26 @@
 	actionListBranches.append(a);
 	actionEditBugzilla2URL=a;
     
-	menu->insertSeparator();
 	
     a = new QAction( tr( "Jump to another vym map, if needed load it first" ), QPixmap(flag_vymlink_xpm), tr( "Jump to map" ), 0, this, "jumpMap" );
     connect( a, SIGNAL( activated() ), this, SLOT( editOpenVymLink() ) );
-    a->addTo( menu );
     a->addTo( tb );
 	a->setEnabled (false);
 	actionEditOpenVymLink=a;
 	
     a = new QAction( tr( "Edit link to another vym map" ), QPixmap(), tr( "Edit vym link"+QString("...") ), 0, this, "editLinkMap" );
     connect( a, SIGNAL( activated() ), this, SLOT( editVymLink() ) );
-    a->addTo( menu );
 	a->setEnabled (false);
 	actionListBranches.append(a);
 	actionEditVymLink=a;
 
     a = new QAction( tr( "Delete link to another vym map" ), QPixmap(), tr( "Delete vym link" ), 0, this, "deleteLinkMap" );
     connect( a, SIGNAL( activated() ), this, SLOT( editDeleteVymLink() ) );
-    a->addTo( menu );
 	a->setEnabled (false);
 	actionEditDeleteVymLink=a;
 
-	menu->insertSeparator();
-
     a = new QAction( tr( "Edit Map Info" ), QPixmap(), tr( "Edit Map Info"+QString("...") ), 0, this, "editMapInfo" );
     connect( a, SIGNAL( activated() ), this, SLOT( editMapInfo() ) );
-    a->addTo( menu );
 	a->setEnabled (true);
 	actionEditMapInfo=a;
 
@@ -521,7 +516,6 @@
     a = new QAction( tr( "edit Heading" ),tr( "Edit heading" ), Key_F2, this, "editHeading" );
     connect( a, SIGNAL( activated() ), this, SLOT( editHeading() ) );
 	a->setEnabled (false);
-    a->addTo ( menu );
 	actionEditHeading=a;
 	actionListBranches.append(a);
     
@@ -529,7 +523,6 @@
     a = new QAction( tr( "Delete Selection" ),tr( "Delete Selection" ), Key_Delete, this, "deleteBranch" );
     connect( a, SIGNAL( activated() ), this, SLOT( editDeleteSelection() ) );
 	a->setEnabled (false);
-    a->addTo ( menu );
 	actionEditDelete=a;
     
     // Shortcut to add branch
@@ -697,6 +690,11 @@
     connect( a, SIGNAL( activated() ), this, SLOT( formatFrameRectangle() ) );
 	actionFormatFrameRectangle=a;
 
+    a = new QAction( tr( "Hide link" ),tr( "Hide link if object is not selected" ), 0, actionFormatHideLinkUnselected, "hideLinkUnselected" );
+	a->setToggleAction(true);
+    connect( a, SIGNAL( activated() ), this, SLOT( formatHideLinkUnselected() ) );
+	actionFormatHideLinkUnselected=a;
+
     menu->insertSeparator();
     a= new QAction( tr( "Use same color for links and headings" ), QPixmap(), tr( "&Use color of heading for link" ), 0, this, "formatLinkColorHint" );
 	a->setToggleAction(true);
@@ -924,6 +922,9 @@
 	branchContextMenu->insertSeparator();	
 	actionGroupFormatFrameTypes->addTo( branchContextMenu );
 
+	branchContextMenu->insertSeparator();	
+	actionFormatHideLinkUnselected->addTo( branchContextMenu );
+
 	// Context Menu for links in a branch menu
 	// This will be populated "on demand" in MapEditor::updateActions
 	branchContextMenu->insertSeparator();	
@@ -961,7 +962,8 @@
     a->addTo( floatimageContextMenu);
 	actionEditToggleFloatExport=a;
 
-
+	floatimageContextMenu->insertSeparator();	
+	actionFormatHideLinkUnselected->addTo( floatimageContextMenu );
 
 	// Context menu for exports
 	exportMenu->insertItem ( tr("Export map as image"),exportImageFormatMenu);
@@ -2195,6 +2197,12 @@
 		currentMapEditor()->setFrame(Rectangle);
 }
 
+void Main::formatHideLinkUnselected()
+{
+	if (currentMapEditor())
+		currentMapEditor()->setHideLinkUnselected(actionFormatHideLinkUnselected->isOn());
+}
+
 void Main::viewZoomReset()
 {
 	if (currentMapEditor())
@@ -2273,6 +2281,12 @@
 		windowShowNoteEditor();
 }
 
+void Main::updateNoteFlag()
+{
+	if (currentMapEditor())
+		currentMapEditor()->updateNoteFlag();
+}
+
 void Main::windowShowNoteEditor()
 {
 	textEditor->setShowWithMain(true);
diff -r e44baadd4958 -r 72cc3873306a mainwindow.h
--- a/mainwindow.h	Thu Sep 01 15:35:18 2005 +0000
+++ b/mainwindow.h	Mon Sep 05 11:56:31 2005 +0000
@@ -135,6 +135,7 @@
     void formatToggleLinkColorHint();
 	void formatFrameNone();
 	void formatFrameRectangle();
+	void formatHideLinkUnselected();
 
     void viewZoomReset();
     void viewZoomIn();
@@ -148,6 +149,8 @@
 	bool settingsURL();
 
 	void windowToggleNoteEditor();
+	void updateNoteFlag();
+
 private slots:
 	void windowNextEditor();
 	void windowPreviousEditor();
diff -r e44baadd4958 -r 72cc3873306a mapeditor.cpp
--- a/mapeditor.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/mapeditor.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -115,6 +115,7 @@
 extern QAction *actionFormatFrameRectangle;
 
 extern QActionGroup *actionGroupFormatLinkStyles;
+extern QAction *actionFormatHideLinkUnselected;
 extern QAction *actionFormatLinkStyleLine;
 extern QAction *actionFormatLinkStyleParabel;
 extern QAction *actionFormatLinkStylePolyLine;
@@ -154,6 +155,7 @@
 
     setCanvas (mapCanvas);
 	
+	// Always show scroll bars (automatic would flicker sometimes)
 	setVScrollBarMode ( QScrollView::AlwaysOn );
 	setHScrollBarMode ( QScrollView::AlwaysOn );
 
@@ -2602,6 +2604,8 @@
 				default:
 					break;
 			}	
+			actionFormatHideLinkUnselected->setOn
+				( selection->getHideLinkUnselected());
 		}
 		if ( (typeid(*selection) == typeid(FloatImageObj)) )
 		{
@@ -2619,6 +2623,8 @@
 			actionEditDelete->setEnabled (true);
 			actionEditToggleFloatExport->setOn
 				( ((FloatImageObj*)(selection))->getFloatExport() );
+			actionFormatHideLinkUnselected->setOn
+				( selection->getHideLinkUnselected());
 		}
 
 	} else
@@ -2640,6 +2646,16 @@
 	}	
 }
 
+void MapEditor::updateNoteFlag()
+{
+	if (selection)
+	{
+		if ( (typeid(*selection) == typeid(BranchObj)) || 
+			(typeid(*selection) == typeid(MapCenterObj))  )
+			((BranchObj*)selection)->updateNoteFlag();
+	}
+}
+
 void MapEditor::setLinkStyle (LinkStyle ls)
 {
 	linkstyle=ls;
@@ -2878,6 +2894,15 @@
 	}
 }
 
+void MapEditor::setHideLinkUnselected (bool b)
+{
+	if (selection && 
+		(typeid(*selection) == typeid(BranchObj)) || 
+		(typeid(*selection) == typeid(MapCenterObj))  ||
+		(typeid(*selection) == typeid(FloatImageObj)) )
+		selection->setHideLinkUnselected(b);
+}
+
 void MapEditor::importDir(BranchObj *dst, QDir d)
 {
 	if (selection && 
@@ -3211,7 +3236,7 @@
     // Move the selected MapObj
     if ( selection && movingObj) 
     {	
-		ensureVisible (p.x(),p.y());
+		ensureSelectionVisible ();
 		
 		// Now move the selection, but add relative position 
 		// (movingObj_start) where selection was chosen with 
diff -r e44baadd4958 -r 72cc3873306a mapeditor.h
--- a/mapeditor.h	Thu Sep 01 15:35:18 2005 +0000
+++ b/mapeditor.h	Mon Sep 05 11:56:31 2005 +0000
@@ -129,6 +129,7 @@
 	void removeChilds();					// remove childs
 	void editMapInfo();						// dialog to enter author, ...
 	void updateActions();					// update e.g. format buttons
+	void updateNoteFlag();					// when TextEditor changes
 	void setLinkStyle (LinkStyle);			// Set style of link
 	LinkStyle getLinkStyle ();				// requested in LMO
 	void setLinkColor(QColor);				// default color of links
@@ -148,6 +149,8 @@
 	void saveFloatImage (int);
 	void toggleFloatExport();
 	void setFrame(const FrameType &);
+	void setHideLinkUnselected (bool);
+	bool getHideLinkUnselected ();
 private:	
     void importDir(BranchObj *,QDir);
 public:	
diff -r e44baadd4958 -r 72cc3873306a ornamentedobj.cpp
--- a/ornamentedobj.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/ornamentedobj.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -199,13 +199,16 @@
 
 void OrnamentedObj::updateNoteFlag()
 {
-	// text in NoteEditor has changed, notify MapEditor 
-	mapEditor->setChanged();
+	if (selected) 
+	{
+		// text in NoteEditor has changed, notify MapEditor 
+		mapEditor->setChanged();
 
-	// save text
-	setNote( textEditor->getText() );
+		// save text
+		setNote( textEditor->getText() );
 	
-	// save font   
-	note.setFontHint (textEditor->getFontHint() );
+		// save font   
+		note.setFontHint (textEditor->getFontHint() );
+	}	
 }
 
diff -r e44baadd4958 -r 72cc3873306a ornamentedobj.h
--- a/ornamentedobj.h	Thu Sep 01 15:35:18 2005 +0000
+++ b/ornamentedobj.h	Mon Sep 05 11:56:31 2005 +0000
@@ -4,7 +4,6 @@
 #include "linkablemapobj.h"
 
 class OrnamentedObj:public LinkableMapObj {
-	Q_OBJECT
 public:	
     OrnamentedObj ();
     OrnamentedObj (QCanvas*);
@@ -33,9 +32,7 @@
 	virtual void toggleStandardFlag(QString, bool);
 	virtual void activateStandardFlag(QString);
 	virtual QString getSystemFlagName (const QPoint &p);
-
-public slots:
-	void updateNoteFlag();
+	virtual void updateNoteFlag();
 
 protected:
     HeadingObj *heading;			// Heading
diff -r e44baadd4958 -r 72cc3873306a tex/vym.changelog
--- a/tex/vym.changelog	Thu Sep 01 15:35:18 2005 +0000
+++ b/tex/vym.changelog	Mon Sep 05 11:56:31 2005 +0000
@@ -1,3 +1,14 @@
+-------------------------------------------------------------------
+Sun Sep  5 10:26:15 CEST 2005 - uwedr
+
+- Version 1.7.4
+- Feature: Link of a branch can be hidden, if object is not selected
+- Bugfix: Zoomed map no longer "jumps around" when branch is selected
+  or moved.
+- Bugfix: TextEditor now has grey background again, if it is empty
+- Bugfix: BranchObj no longer need to connect to TextEditor, BranchObj
+  is no longer a QOBJECT
+
 -------------------------------------------------------------------
 Thu Sep  1 12:26:24 CEST 2005 - uwedr
 
diff -r e44baadd4958 -r 72cc3873306a texteditor.cpp
--- a/texteditor.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/texteditor.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -527,13 +527,10 @@
 	else
 		state=filledEditor;
 
-	if (state != oldstate)
-	{
 		if (state==emptyEditor)
 			e->setPaper (emptyPaper);
 		else
 			e->setPaper (filledPaper);
-	}
 	// SLOT is LinkableMapObj, which will update systemFlag
 	emit (textHasChanged() );
 }
@@ -545,7 +542,7 @@
 		t = QStyleSheet::convertFromPlainText( t, QStyleSheetItem::WhiteSpaceNormal );
 	e->setReadOnly(false);
 	e->setText(t);
-	editorChanged();	//not called automagically
+//	editorChanged();	//not called automagically  FIXME or is it?
 
 	enableActions();
 }
diff -r e44baadd4958 -r 72cc3873306a version.h
--- a/version.h	Thu Sep 01 15:35:18 2005 +0000
+++ b/version.h	Mon Sep 05 11:56:31 2005 +0000
@@ -1,7 +1,7 @@
 #ifndef VERSION_H 
 #define VERSION_H
 
-#define __VYM_VERSION__ "1.7.3"
-#define __BUILD_DATE__ "September 1, 2005"
+#define __VYM_VERSION__ "1.7.4"
+#define __BUILD_DATE__ "September 5, 2005"
 
 #endif
diff -r e44baadd4958 -r 72cc3873306a xml.cpp
--- a/xml.cpp	Thu Sep 01 15:35:18 2005 +0000
+++ b/xml.cpp	Mon Sep 05 11:56:31 2005 +0000
@@ -13,6 +13,7 @@
 
 static BranchObj *lastBranch;
 static FloatObj *lastFloat;
+static LinkableMapObj *lastLMO;
 
 extern Settings settings;
 
@@ -139,7 +140,7 @@
 			if (lmo && (typeid(*lmo) == typeid(BranchObj) ) 
 			        || (typeid(*lmo) == typeid(MapCenterObj) ) )
 			{
-				lastBranch=(BranchObj*)(lmo);
+				lastBranch=(BranchObj*)lmo;
 				if (loadMode==ImportAdd)
 				{
 					lastBranch->addBranch();
@@ -197,6 +198,7 @@
 			{
 				lastBranch->addBranch();
 				lastBranch=lastBranch->getLastBranch();
+				
 			} else
 				lastBranch->clear();
 		} else
@@ -398,6 +400,9 @@
 
 bool mapBuilderHandler::readBranchAttr (const QXmlAttributes& a)
 {
+	lastLMO=lastBranch;
+	if (!readLinkAttr(a)) return false;
+
 	bool okx,oky;
 	int x,y;
 	if (!a.value( "absPosX").isEmpty() && loadMode==NewMap && branchDepth<2) 
@@ -423,6 +428,16 @@
 	return true;	
 }
 
+bool mapBuilderHandler::readLinkAttr (const QXmlAttributes& a)
+{
+	if (!a.value( "hideLinkUnselected").isEmpty()) 
+	{
+		if (a.value ("hideLinkUnselected") =="true")
+			if (lastLMO) lastLMO->setHideLinkUnselected(true);
+	}	
+	return true;	
+}
+
 bool mapBuilderHandler::readNoteAttr (const QXmlAttributes& a)
 {	// only for backward compatibility (<1.4.6). Use htmlnote now.
 	no.clear();
@@ -471,6 +486,9 @@
 
 bool mapBuilderHandler::readFloatImageAttr (const QXmlAttributes& a)
 {
+	lastLMO=lastFloat;
+	if (!readLinkAttr(a)) return false;
+	
 	if (!a.value( "useOrientation").isEmpty() ) 
 	{
 		if (a.value ("useOrientation") =="true")
diff -r e44baadd4958 -r 72cc3873306a xml.h
--- a/xml.h	Thu Sep 01 15:35:18 2005 +0000
+++ b/xml.h	Mon Sep 05 11:56:31 2005 +0000
@@ -27,6 +27,7 @@
 	void setTmpDir (QString);
 	void setLoadMode (const LoadMode &);
 	bool readBranchAttr (const QXmlAttributes&);
+	bool readLinkAttr (const QXmlAttributes&);
 	bool readNoteAttr (const QXmlAttributes&);
 	bool readFloatImageAttr (const QXmlAttributes&);
 	bool readXLinkAttr (const QXmlAttributes&);