Version 1.7.4, various bugfixes
authorinsilmaril
Mon, 05 Sep 2005 11:56:31 +0000
changeset 16072cc3873306a
parent 159 e44baadd4958
child 161 88efbd21cff1
Version 1.7.4, various bugfixes
aboutdialog.cpp
branchobj.cpp
demos/todo.vym
exports.cpp
floatobj.cpp
linkablemapobj.cpp
linkablemapobj.h
main.cpp
mainwindow.cpp
mainwindow.h
mapeditor.cpp
mapeditor.h
ornamentedobj.cpp
ornamentedobj.h
tex/vym.changelog
texteditor.cpp
version.h
xml.cpp
xml.h
     1.1 --- a/aboutdialog.cpp	Thu Sep 01 15:35:18 2005 +0000
     1.2 +++ b/aboutdialog.cpp	Mon Sep 05 11:56:31 2005 +0000
     1.3 @@ -25,6 +25,7 @@
     1.4  	"<h3><center><img src=\"vym_logo\">VYM - View Your Mind </h3>"
     1.5  	"<p align=\"center\"> A tool to put the things you have got in your mind into a map.</p>"
     1.6  	"<p align=\"center\"> (c) by Uwe Drechsel (<a href=\"mailto:vym@InSilmaril.de\">vym@InSilmaril.de</a>)</p>"
     1.7 +	"<p align=\"center\"> Version " __VYM_VERSION__" - " __BUILD_DATE__"</p>"
     1.8  	"<ul>"
     1.9  	"<li> Contact</li>"
    1.10  		"<ul>"
     2.1 --- a/branchobj.cpp	Thu Sep 01 15:35:18 2005 +0000
     2.2 +++ b/branchobj.cpp	Mon Sep 05 11:56:31 2005 +0000
     2.3 @@ -743,6 +743,8 @@
     2.4  	else
     2.5  		posAttr="";
     2.6  
     2.7 +	QString linkAttr=getLinkAttr();
     2.8 +
     2.9  	QString urlAttr;
    2.10  	if (!url.isEmpty())
    2.11  		urlAttr=attribut ("url",url);
    2.12 @@ -770,11 +772,11 @@
    2.13  	} else
    2.14  		areaAttr="";
    2.15  	
    2.16 -    s=beginElement ("branch" +scrolledAttr +posAttr +urlAttr +vymLinkAttr +frameAttr +areaAttr );
    2.17 +    s=beginElement ("branch" +scrolledAttr +posAttr +linkAttr +urlAttr +vymLinkAttr +frameAttr +areaAttr );
    2.18      incIndent();
    2.19  
    2.20  	// save heading
    2.21 -    s=s+valueElement("heading", getHeading(),
    2.22 +    s+=valueElement("heading", getHeading(),
    2.23  		attribut ("textColor",QColor(heading->getColor()).name()));
    2.24  
    2.25  	// save names of flags set
    2.26 @@ -1302,6 +1304,15 @@
    2.27  
    2.28  void BranchObj::select()
    2.29  {
    2.30 +	// set Text in Editor	
    2.31 +	textEditor->setText(note.getNote() );
    2.32 +	QString fnh=note.getFilenameHint();
    2.33 +	if (fnh!="")
    2.34 +		textEditor->setFilenameHint(note.getFilenameHint() );
    2.35 +	else	
    2.36 +		textEditor->setFilenameHint(getHeading() );
    2.37 +	textEditor->setFontHint (note.getFontHint() );
    2.38 +
    2.39      LinkableMapObj::select();
    2.40  	// Tell parent that I am selected now:
    2.41  	BranchObj* po=(BranchObj*)(parObj);
    2.42 @@ -1311,17 +1322,6 @@
    2.43  	// temporary unscroll, if we have scrolled parents somewhere
    2.44  	if (parObj) ((BranchObj*)(parObj))->tmpUnscroll();
    2.45  
    2.46 -	// set Text in Editor	
    2.47 -	textEditor->setText(note.getNote() );
    2.48 -	QString fnh=note.getFilenameHint();
    2.49 -	if (fnh!="")
    2.50 -		textEditor->setFilenameHint(note.getFilenameHint() );
    2.51 -	else	
    2.52 -		textEditor->setFilenameHint(getHeading() );
    2.53 -	textEditor->setFontHint (note.getFontHint() );
    2.54 -	connect (textEditor, SIGNAL (textHasChanged() ), this, SLOT (updateNoteFlag() ) ); 
    2.55 -	connect (textEditor, SIGNAL (fontSizeHasChanged() ), this, SLOT (updateNoteFlag() ) ); 
    2.56 -
    2.57  	// Show URL and link in statusbar
    2.58  	QString status;
    2.59  	if (!url.isEmpty()) status+="URL: "+url+"  ";
    2.60 @@ -1355,10 +1355,6 @@
    2.61  	// reset temporary unscroll, if we have scrolled parents somewhere
    2.62  	if (parObj) ((BranchObj*)(parObj))->resetTmpUnscroll();
    2.63  
    2.64 -	// Disconnect textEditor from this LMO
    2.65 -	disconnect( textEditor, SIGNAL(textHasChanged()), 0, 0 );
    2.66 -	disconnect( textEditor, SIGNAL (fontSizeHasChanged()),0,0 ); 
    2.67 -
    2.68  	// Erase content of editor 
    2.69  	textEditor->setInactive();
    2.70  
     3.1 Binary file demos/todo.vym has changed
     4.1 --- a/exports.cpp	Thu Sep 01 15:35:18 2005 +0000
     4.2 +++ b/exports.cpp	Mon Sep 05 11:56:31 2005 +0000
     4.3 @@ -35,7 +35,8 @@
     4.4  	// Main loop over all branches
     4.5  	QString s;
     4.6  	QString actIndent("");
     4.7 -	uint i;
     4.8 +	int i;
     4.9 +	uint j;
    4.10  	BranchObj *bo;
    4.11  	bo=mapCenter->first();
    4.12  	while (bo) 
    4.13 @@ -48,7 +49,7 @@
    4.14  		if (bo->getDepth()==0)
    4.15  		{
    4.16  			ts << (bo->getHeading()+ "\n");
    4.17 -			for (i=0;i<bo->getHeading().length();i++) ts<<"=";
    4.18 +			for (j=0;j<bo->getHeading().length();j++) ts<<"=";
    4.19  			ts << "\n";
    4.20  		} else 	if (bo->getDepth()==1)
    4.21  			ts << ("\n"+getSectionString(bo) + bo->getHeading()+ "\n");
     5.1 --- a/floatobj.cpp	Thu Sep 01 15:35:18 2005 +0000
     5.2 +++ b/floatobj.cpp	Mon Sep 05 11:56:31 2005 +0000
     5.3 @@ -42,6 +42,8 @@
     5.4  	useOrientation=true;
     5.5  	floatExport=true;
     5.6  	zPlane=Z_ICON;
     5.7 +	setLinkStyle (StyleParabel);
     5.8 +	setHideLinkUnselected(true);
     5.9  }
    5.10  
    5.11  void FloatObj::copy (FloatObj* other)
     6.1 --- a/linkablemapobj.cpp	Thu Sep 01 15:35:18 2005 +0000
     6.2 +++ b/linkablemapobj.cpp	Mon Sep 05 11:56:31 2005 +0000
     6.3 @@ -91,6 +91,8 @@
     6.4      selbox->hide();
     6.5      selected=false;
     6.6  
     6.7 +	hideLinkUnselected=false;
     6.8 +
     6.9  	// initialize frame
    6.10  	frame = new FrameObj (canvas);
    6.11  	
    6.12 @@ -258,6 +260,18 @@
    6.13  	return style;
    6.14  }
    6.15  
    6.16 +void LinkableMapObj::setHideLinkUnselected(bool b)
    6.17 +{
    6.18 +	hideLinkUnselected=b;
    6.19 +	setVisibility (visible);
    6.20 +	updateLink();
    6.21 +}
    6.22 +
    6.23 +bool LinkableMapObj::getHideLinkUnselected()
    6.24 +{
    6.25 +	return hideLinkUnselected;
    6.26 +}
    6.27 +
    6.28  void LinkableMapObj::setLinkPos(LinkPos lp)
    6.29  {
    6.30  	linkpos=lp;
    6.31 @@ -302,7 +316,6 @@
    6.32  		default:
    6.33  			break;
    6.34  	} // switch (style)	
    6.35 -	//FIXME updateLink();
    6.36  }
    6.37  
    6.38  QColor LinkableMapObj::getLinkColor()
    6.39 @@ -333,32 +346,60 @@
    6.40  
    6.41  void LinkableMapObj::setVisibility (bool v)
    6.42  {
    6.43 +	QCanvasLine* cl;
    6.44  	MapObj::setVisibility (v);
    6.45 -	if (visible) 
    6.46 +	bool visnow=visible;
    6.47 +	if (hideLinkUnselected && !selected)
    6.48 +		visnow=false;
    6.49 +
    6.50 +	if (visnow) 
    6.51  	{
    6.52  		bottomline->show();
    6.53 -		// FIXME lines and segments should be done in LMO?
    6.54 -		if (style==StyleLine && l) 
    6.55 +		switch (style)
    6.56  		{
    6.57 -			l->show();
    6.58 -		} else
    6.59 -		{
    6.60 -			QCanvasLine* cl;
    6.61 -			for (cl=segment.first(); cl; cl=segment.next() )
    6.62 -				cl->show();
    6.63 -		} 
    6.64 +			case StyleLine:
    6.65 +				if (l) l->show();
    6.66 +				break;
    6.67 +			case StyleParabel:	
    6.68 +				for (cl=segment.first(); cl; cl=segment.next() )
    6.69 +					cl->show();
    6.70 +				break;	
    6.71 +			case StylePolyLine:
    6.72 +				if (p) p->show();
    6.73 +				if (l) l->show();
    6.74 +				break;
    6.75 +			case StylePolyParabel:	
    6.76 +				for (cl=segment.first(); cl; cl=segment.next() )
    6.77 +					cl->show();
    6.78 +				if (p) p->show();
    6.79 +				break;
    6.80 +			default:
    6.81 +				break;
    6.82 +		}
    6.83  	} else 
    6.84  	{
    6.85  		bottomline->hide();
    6.86 -		if (style==StyleLine && l) 
    6.87 +		switch (style)
    6.88  		{
    6.89 -			l->hide();
    6.90 -		} else
    6.91 -		{
    6.92 -			QCanvasLine* cl;
    6.93 -			for (cl=segment.first(); cl; cl=segment.next() )
    6.94 -				cl->hide();
    6.95 -		} 
    6.96 +			case StyleLine:
    6.97 +				if (l) l->hide();
    6.98 +				break;
    6.99 +			case StyleParabel:	
   6.100 +				for (cl=segment.first(); cl; cl=segment.next() )
   6.101 +					cl->hide();
   6.102 +				break;	
   6.103 +			case StylePolyLine:
   6.104 +				if (p) p->hide();
   6.105 +				if (l) l->hide();
   6.106 +				break;
   6.107 +			case StylePolyParabel:	
   6.108 +				for (cl=segment.first(); cl; cl=segment.next() )
   6.109 +					cl->hide();
   6.110 +				if (p) p->hide();
   6.111 +				break;
   6.112 +			default:
   6.113 +				break;
   6.114 +		}
   6.115  	}	
   6.116  }
   6.117  
   6.118 @@ -681,6 +722,7 @@
   6.119  	setSelBox();
   6.120      selected=true;
   6.121      selbox->show();
   6.122 +	setVisibility (visible);
   6.123  }
   6.124  
   6.125  
   6.126 @@ -688,6 +730,7 @@
   6.127  {
   6.128      selected=false;
   6.129      selbox->hide();
   6.130 +	setVisibility (visible);
   6.131  }
   6.132  
   6.133  void LinkableMapObj::parabel (QPointArray &ya, double p1x, double p1y, double p2x, double p2y)
   6.134 @@ -719,3 +762,15 @@
   6.135  	}	
   6.136  }
   6.137  
   6.138 +QString LinkableMapObj::getLinkAttr ()
   6.139 +{
   6.140 +	QString hideAttr;
   6.141 +	if (hideLinkUnselected)
   6.142 +		// Since this is currently the
   6.143 +		// only attribut and it is switched off by default
   6.144 +		// don't write <link>  at all if it is missing
   6.145 +		return attribut ("hideLinkUnselected","true");
   6.146 +	else
   6.147 +		return "";
   6.148 +	
   6.149 +}
     7.1 --- a/linkablemapobj.h	Thu Sep 01 15:35:18 2005 +0000
     7.2 +++ b/linkablemapobj.h	Mon Sep 05 11:56:31 2005 +0000
     7.3 @@ -36,6 +36,8 @@
     7.4  	LinkStyle getDefLinkStyle();
     7.5      void setLinkStyle(LinkStyle);            
     7.6  	LinkStyle getLinkStyle();
     7.7 +	void setHideLinkUnselected(bool);
     7.8 +	bool getHideLinkUnselected();
     7.9  	void setLinkPos (LinkPos);
    7.10  	LinkPos getLinkPos ();
    7.11  
    7.12 @@ -79,6 +81,8 @@
    7.13  
    7.14  protected:
    7.15  	void parabel(QPointArray &,double,double,double,double);	// Create Parabel connecting two points
    7.16 +	QString getLinkAttr();
    7.17 +
    7.18      QPoint childPos;
    7.19      QPoint parPos;
    7.20  	bool link2ParPos;				// While moving around, sometimes link to parent
    7.21 @@ -94,7 +98,7 @@
    7.22      int offset;                     // vertical offset of dockpos to pos
    7.23  
    7.24  	int thickness_start;			// for StylePoly*	
    7.25 -    LinkStyle style;
    7.26 +    LinkStyle style;				// Current style
    7.27  	LinkPos linkpos;
    7.28      QColor linkcolor;               // Link color
    7.29      QCanvasLine* l;                 // line style
    7.30 @@ -108,6 +112,7 @@
    7.31  	bool repositionRequest;			// 
    7.32  
    7.33  	bool selected;					// Used for marking the selection
    7.34 +	bool hideLinkUnselected;		// to hide links if unselected
    7.35  	QCanvasRectangle* selbox;
    7.36  	FrameObj *frame;				// frame around object
    7.37  };
     8.1 --- a/main.cpp	Thu Sep 01 15:35:18 2005 +0000
     8.2 +++ b/main.cpp	Mon Sep 05 11:56:31 2005 +0000
     8.3 @@ -81,6 +81,7 @@
     8.4  QAction *actionFormatFrameRectangle;
     8.5  
     8.6  QActionGroup *actionGroupFormatLinkStyles;
     8.7 +QAction *actionFormatHideLinkUnselected;
     8.8  QAction *actionFormatLinkStyleLine;
     8.9  QAction *actionFormatLinkStyleParabel;
    8.10  QAction *actionFormatLinkStylePolyLine;
     9.1 --- a/mainwindow.cpp	Thu Sep 01 15:35:18 2005 +0000
     9.2 +++ b/mainwindow.cpp	Mon Sep 05 11:56:31 2005 +0000
     9.3 @@ -121,6 +121,7 @@
     9.4  extern QAction *actionFormatLinkStyleParabel;
     9.5  extern QAction *actionFormatLinkStylePolyLine;
     9.6  extern QAction *actionFormatLinkStylePolyParabel;
     9.7 +extern QAction *actionFormatHideLinkUnselected;
     9.8  
     9.9  extern QAction *actionViewToggleNoteEditor;
    9.10  
    9.11 @@ -234,6 +235,10 @@
    9.12  	connect (findWindow, SIGNAL( somethingChanged() ), 
    9.13  		this, SLOT(editFindChanged() ) );	
    9.14  
    9.15 +	// FIXME testing
    9.16 +	// Connect TextEditor, so that we can update flags if text changes
    9.17 +	connect (textEditor, SIGNAL (textHasChanged() ), this, SLOT (updateNoteFlag()));
    9.18 +
    9.19  	updateGeometry();
    9.20  
    9.21  	// Creating  the default map into first tab is done in main.cpp now...
    9.22 @@ -453,21 +458,18 @@
    9.23  
    9.24  	a = new QAction( tr( "Open URL" ), QPixmap(flag_url_xpm), tr( "Open URL" ), CTRL + Key_U, this, "url" );
    9.25      connect( a, SIGNAL( activated() ), this, SLOT( editOpenURL() ) );
    9.26 -    a->addTo( menu );
    9.27      a->addTo( tb );
    9.28  	a->setEnabled (false);
    9.29  	actionEditOpenURL=a;
    9.30  
    9.31  	a = new QAction( tr( "Edit URL" ), QPixmap(), tr( "Edit URL"+QString("...") ), SHIFT + CTRL + Key_U, this, "url" );
    9.32      connect( a, SIGNAL( activated() ), this, SLOT( editURL() ) );
    9.33 -    a->addTo( menu );
    9.34  	a->setEnabled (false);
    9.35  	actionListBranches.append(a);
    9.36  	actionEditURL=a;
    9.37  	
    9.38  	a = new QAction( tr( "Use heading of selected branch as URL" ), QPixmap(), tr( "Use heading for URL" ), 0, this, "heading2url" );
    9.39      connect( a, SIGNAL( activated() ), this, SLOT( editHeading2URL() ) );
    9.40 -    a->addTo( menu );
    9.41  	a->setEnabled (false);
    9.42  	actionListBranches.append(a);
    9.43  	actionEditHeading2URL=a;
    9.44 @@ -478,33 +480,26 @@
    9.45  	actionListBranches.append(a);
    9.46  	actionEditBugzilla2URL=a;
    9.47      
    9.48 -	menu->insertSeparator();
    9.49  	
    9.50      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" );
    9.51      connect( a, SIGNAL( activated() ), this, SLOT( editOpenVymLink() ) );
    9.52 -    a->addTo( menu );
    9.53      a->addTo( tb );
    9.54  	a->setEnabled (false);
    9.55  	actionEditOpenVymLink=a;
    9.56  	
    9.57      a = new QAction( tr( "Edit link to another vym map" ), QPixmap(), tr( "Edit vym link"+QString("...") ), 0, this, "editLinkMap" );
    9.58      connect( a, SIGNAL( activated() ), this, SLOT( editVymLink() ) );
    9.59 -    a->addTo( menu );
    9.60  	a->setEnabled (false);
    9.61  	actionListBranches.append(a);
    9.62  	actionEditVymLink=a;
    9.63  
    9.64      a = new QAction( tr( "Delete link to another vym map" ), QPixmap(), tr( "Delete vym link" ), 0, this, "deleteLinkMap" );
    9.65      connect( a, SIGNAL( activated() ), this, SLOT( editDeleteVymLink() ) );
    9.66 -    a->addTo( menu );
    9.67  	a->setEnabled (false);
    9.68  	actionEditDeleteVymLink=a;
    9.69  
    9.70 -	menu->insertSeparator();
    9.71 -
    9.72      a = new QAction( tr( "Edit Map Info" ), QPixmap(), tr( "Edit Map Info"+QString("...") ), 0, this, "editMapInfo" );
    9.73      connect( a, SIGNAL( activated() ), this, SLOT( editMapInfo() ) );
    9.74 -    a->addTo( menu );
    9.75  	a->setEnabled (true);
    9.76  	actionEditMapInfo=a;
    9.77  
    9.78 @@ -521,7 +516,6 @@
    9.79      a = new QAction( tr( "edit Heading" ),tr( "Edit heading" ), Key_F2, this, "editHeading" );
    9.80      connect( a, SIGNAL( activated() ), this, SLOT( editHeading() ) );
    9.81  	a->setEnabled (false);
    9.82 -    a->addTo ( menu );
    9.83  	actionEditHeading=a;
    9.84  	actionListBranches.append(a);
    9.85      
    9.86 @@ -529,7 +523,6 @@
    9.87      a = new QAction( tr( "Delete Selection" ),tr( "Delete Selection" ), Key_Delete, this, "deleteBranch" );
    9.88      connect( a, SIGNAL( activated() ), this, SLOT( editDeleteSelection() ) );
    9.89  	a->setEnabled (false);
    9.90 -    a->addTo ( menu );
    9.91  	actionEditDelete=a;
    9.92      
    9.93      // Shortcut to add branch
    9.94 @@ -697,6 +690,11 @@
    9.95      connect( a, SIGNAL( activated() ), this, SLOT( formatFrameRectangle() ) );
    9.96  	actionFormatFrameRectangle=a;
    9.97  
    9.98 +    a = new QAction( tr( "Hide link" ),tr( "Hide link if object is not selected" ), 0, actionFormatHideLinkUnselected, "hideLinkUnselected" );
    9.99 +	a->setToggleAction(true);
   9.100 +    connect( a, SIGNAL( activated() ), this, SLOT( formatHideLinkUnselected() ) );
   9.101 +	actionFormatHideLinkUnselected=a;
   9.102 +
   9.103      menu->insertSeparator();
   9.104      a= new QAction( tr( "Use same color for links and headings" ), QPixmap(), tr( "&Use color of heading for link" ), 0, this, "formatLinkColorHint" );
   9.105  	a->setToggleAction(true);
   9.106 @@ -924,6 +922,9 @@
   9.107  	branchContextMenu->insertSeparator();	
   9.108  	actionGroupFormatFrameTypes->addTo( branchContextMenu );
   9.109  
   9.110 +	branchContextMenu->insertSeparator();	
   9.111 +	actionFormatHideLinkUnselected->addTo( branchContextMenu );
   9.112 +
   9.113  	// Context Menu for links in a branch menu
   9.114  	// This will be populated "on demand" in MapEditor::updateActions
   9.115  	branchContextMenu->insertSeparator();	
   9.116 @@ -961,7 +962,8 @@
   9.117      a->addTo( floatimageContextMenu);
   9.118  	actionEditToggleFloatExport=a;
   9.119  
   9.120 -
   9.121 +	floatimageContextMenu->insertSeparator();	
   9.122 +	actionFormatHideLinkUnselected->addTo( floatimageContextMenu );
   9.123  
   9.124  	// Context menu for exports
   9.125  	exportMenu->insertItem ( tr("Export map as image"),exportImageFormatMenu);
   9.126 @@ -2195,6 +2197,12 @@
   9.127  		currentMapEditor()->setFrame(Rectangle);
   9.128  }
   9.129  
   9.130 +void Main::formatHideLinkUnselected()
   9.131 +{
   9.132 +	if (currentMapEditor())
   9.133 +		currentMapEditor()->setHideLinkUnselected(actionFormatHideLinkUnselected->isOn());
   9.134 +}
   9.135 +
   9.136  void Main::viewZoomReset()
   9.137  {
   9.138  	if (currentMapEditor())
   9.139 @@ -2273,6 +2281,12 @@
   9.140  		windowShowNoteEditor();
   9.141  }
   9.142  
   9.143 +void Main::updateNoteFlag()
   9.144 +{
   9.145 +	if (currentMapEditor())
   9.146 +		currentMapEditor()->updateNoteFlag();
   9.147 +}
   9.148 +
   9.149  void Main::windowShowNoteEditor()
   9.150  {
   9.151  	textEditor->setShowWithMain(true);
    10.1 --- a/mainwindow.h	Thu Sep 01 15:35:18 2005 +0000
    10.2 +++ b/mainwindow.h	Mon Sep 05 11:56:31 2005 +0000
    10.3 @@ -135,6 +135,7 @@
    10.4      void formatToggleLinkColorHint();
    10.5  	void formatFrameNone();
    10.6  	void formatFrameRectangle();
    10.7 +	void formatHideLinkUnselected();
    10.8  
    10.9      void viewZoomReset();
   10.10      void viewZoomIn();
   10.11 @@ -148,6 +149,8 @@
   10.12  	bool settingsURL();
   10.13  
   10.14  	void windowToggleNoteEditor();
   10.15 +	void updateNoteFlag();
   10.16 +
   10.17  private slots:
   10.18  	void windowNextEditor();
   10.19  	void windowPreviousEditor();
    11.1 --- a/mapeditor.cpp	Thu Sep 01 15:35:18 2005 +0000
    11.2 +++ b/mapeditor.cpp	Mon Sep 05 11:56:31 2005 +0000
    11.3 @@ -115,6 +115,7 @@
    11.4  extern QAction *actionFormatFrameRectangle;
    11.5  
    11.6  extern QActionGroup *actionGroupFormatLinkStyles;
    11.7 +extern QAction *actionFormatHideLinkUnselected;
    11.8  extern QAction *actionFormatLinkStyleLine;
    11.9  extern QAction *actionFormatLinkStyleParabel;
   11.10  extern QAction *actionFormatLinkStylePolyLine;
   11.11 @@ -154,6 +155,7 @@
   11.12  
   11.13      setCanvas (mapCanvas);
   11.14  	
   11.15 +	// Always show scroll bars (automatic would flicker sometimes)
   11.16  	setVScrollBarMode ( QScrollView::AlwaysOn );
   11.17  	setHScrollBarMode ( QScrollView::AlwaysOn );
   11.18  
   11.19 @@ -2602,6 +2604,8 @@
   11.20  				default:
   11.21  					break;
   11.22  			}	
   11.23 +			actionFormatHideLinkUnselected->setOn
   11.24 +				( selection->getHideLinkUnselected());
   11.25  		}
   11.26  		if ( (typeid(*selection) == typeid(FloatImageObj)) )
   11.27  		{
   11.28 @@ -2619,6 +2623,8 @@
   11.29  			actionEditDelete->setEnabled (true);
   11.30  			actionEditToggleFloatExport->setOn
   11.31  				( ((FloatImageObj*)(selection))->getFloatExport() );
   11.32 +			actionFormatHideLinkUnselected->setOn
   11.33 +				( selection->getHideLinkUnselected());
   11.34  		}
   11.35  
   11.36  	} else
   11.37 @@ -2640,6 +2646,16 @@
   11.38  	}	
   11.39  }
   11.40  
   11.41 +void MapEditor::updateNoteFlag()
   11.42 +{
   11.43 +	if (selection)
   11.44 +	{
   11.45 +		if ( (typeid(*selection) == typeid(BranchObj)) || 
   11.46 +			(typeid(*selection) == typeid(MapCenterObj))  )
   11.47 +			((BranchObj*)selection)->updateNoteFlag();
   11.48 +	}
   11.49 +}
   11.50 +
   11.51  void MapEditor::setLinkStyle (LinkStyle ls)
   11.52  {
   11.53  	linkstyle=ls;
   11.54 @@ -2878,6 +2894,15 @@
   11.55  	}
   11.56  }
   11.57  
   11.58 +void MapEditor::setHideLinkUnselected (bool b)
   11.59 +{
   11.60 +	if (selection && 
   11.61 +		(typeid(*selection) == typeid(BranchObj)) || 
   11.62 +		(typeid(*selection) == typeid(MapCenterObj))  ||
   11.63 +		(typeid(*selection) == typeid(FloatImageObj)) )
   11.64 +		selection->setHideLinkUnselected(b);
   11.65 +}
   11.66 +
   11.67  void MapEditor::importDir(BranchObj *dst, QDir d)
   11.68  {
   11.69  	if (selection && 
   11.70 @@ -3211,7 +3236,7 @@
   11.71      // Move the selected MapObj
   11.72      if ( selection && movingObj) 
   11.73      {	
   11.74 -		ensureVisible (p.x(),p.y());
   11.75 +		ensureSelectionVisible ();
   11.76  		
   11.77  		// Now move the selection, but add relative position 
   11.78  		// (movingObj_start) where selection was chosen with 
    12.1 --- a/mapeditor.h	Thu Sep 01 15:35:18 2005 +0000
    12.2 +++ b/mapeditor.h	Mon Sep 05 11:56:31 2005 +0000
    12.3 @@ -129,6 +129,7 @@
    12.4  	void removeChilds();					// remove childs
    12.5  	void editMapInfo();						// dialog to enter author, ...
    12.6  	void updateActions();					// update e.g. format buttons
    12.7 +	void updateNoteFlag();					// when TextEditor changes
    12.8  	void setLinkStyle (LinkStyle);			// Set style of link
    12.9  	LinkStyle getLinkStyle ();				// requested in LMO
   12.10  	void setLinkColor(QColor);				// default color of links
   12.11 @@ -148,6 +149,8 @@
   12.12  	void saveFloatImage (int);
   12.13  	void toggleFloatExport();
   12.14  	void setFrame(const FrameType &);
   12.15 +	void setHideLinkUnselected (bool);
   12.16 +	bool getHideLinkUnselected ();
   12.17  private:	
   12.18      void importDir(BranchObj *,QDir);
   12.19  public:	
    13.1 --- a/ornamentedobj.cpp	Thu Sep 01 15:35:18 2005 +0000
    13.2 +++ b/ornamentedobj.cpp	Mon Sep 05 11:56:31 2005 +0000
    13.3 @@ -199,13 +199,16 @@
    13.4  
    13.5  void OrnamentedObj::updateNoteFlag()
    13.6  {
    13.7 -	// text in NoteEditor has changed, notify MapEditor 
    13.8 -	mapEditor->setChanged();
    13.9 +	if (selected) 
   13.10 +	{
   13.11 +		// text in NoteEditor has changed, notify MapEditor 
   13.12 +		mapEditor->setChanged();
   13.13  
   13.14 -	// save text
   13.15 -	setNote( textEditor->getText() );
   13.16 +		// save text
   13.17 +		setNote( textEditor->getText() );
   13.18  	
   13.19 -	// save font   
   13.20 -	note.setFontHint (textEditor->getFontHint() );
   13.21 +		// save font   
   13.22 +		note.setFontHint (textEditor->getFontHint() );
   13.23 +	}	
   13.24  }
   13.25  
    14.1 --- a/ornamentedobj.h	Thu Sep 01 15:35:18 2005 +0000
    14.2 +++ b/ornamentedobj.h	Mon Sep 05 11:56:31 2005 +0000
    14.3 @@ -4,7 +4,6 @@
    14.4  #include "linkablemapobj.h"
    14.5  
    14.6  class OrnamentedObj:public LinkableMapObj {
    14.7 -	Q_OBJECT
    14.8  public:	
    14.9      OrnamentedObj ();
   14.10      OrnamentedObj (QCanvas*);
   14.11 @@ -33,9 +32,7 @@
   14.12  	virtual void toggleStandardFlag(QString, bool);
   14.13  	virtual void activateStandardFlag(QString);
   14.14  	virtual QString getSystemFlagName (const QPoint &p);
   14.15 -
   14.16 -public slots:
   14.17 -	void updateNoteFlag();
   14.18 +	virtual void updateNoteFlag();
   14.19  
   14.20  protected:
   14.21      HeadingObj *heading;			// Heading
    15.1 --- a/tex/vym.changelog	Thu Sep 01 15:35:18 2005 +0000
    15.2 +++ b/tex/vym.changelog	Mon Sep 05 11:56:31 2005 +0000
    15.3 @@ -1,3 +1,14 @@
    15.4 +-------------------------------------------------------------------
    15.5 +Sun Sep  5 10:26:15 CEST 2005 - uwedr
    15.6 +
    15.7 +- Version 1.7.4
    15.8 +- Feature: Link of a branch can be hidden, if object is not selected
    15.9 +- Bugfix: Zoomed map no longer "jumps around" when branch is selected
   15.10 +  or moved.
   15.11 +- Bugfix: TextEditor now has grey background again, if it is empty
   15.12 +- Bugfix: BranchObj no longer need to connect to TextEditor, BranchObj
   15.13 +  is no longer a QOBJECT
   15.14 +
   15.15  -------------------------------------------------------------------
   15.16  Thu Sep  1 12:26:24 CEST 2005 - uwedr
   15.17  
    16.1 --- a/texteditor.cpp	Thu Sep 01 15:35:18 2005 +0000
    16.2 +++ b/texteditor.cpp	Mon Sep 05 11:56:31 2005 +0000
    16.3 @@ -527,13 +527,10 @@
    16.4  	else
    16.5  		state=filledEditor;
    16.6  
    16.7 -	if (state != oldstate)
    16.8 -	{
    16.9  		if (state==emptyEditor)
   16.10  			e->setPaper (emptyPaper);
   16.11  		else
   16.12  			e->setPaper (filledPaper);
   16.13 -	}
   16.14  	// SLOT is LinkableMapObj, which will update systemFlag
   16.15  	emit (textHasChanged() );
   16.16  }
   16.17 @@ -545,7 +542,7 @@
   16.18  		t = QStyleSheet::convertFromPlainText( t, QStyleSheetItem::WhiteSpaceNormal );
   16.19  	e->setReadOnly(false);
   16.20  	e->setText(t);
   16.21 -	editorChanged();	//not called automagically
   16.22 +//	editorChanged();	//not called automagically  FIXME or is it?
   16.23  
   16.24  	enableActions();
   16.25  }
    17.1 --- a/version.h	Thu Sep 01 15:35:18 2005 +0000
    17.2 +++ b/version.h	Mon Sep 05 11:56:31 2005 +0000
    17.3 @@ -1,7 +1,7 @@
    17.4  #ifndef VERSION_H 
    17.5  #define VERSION_H
    17.6  
    17.7 -#define __VYM_VERSION__ "1.7.3"
    17.8 -#define __BUILD_DATE__ "September 1, 2005"
    17.9 +#define __VYM_VERSION__ "1.7.4"
   17.10 +#define __BUILD_DATE__ "September 5, 2005"
   17.11  
   17.12  #endif
    18.1 --- a/xml.cpp	Thu Sep 01 15:35:18 2005 +0000
    18.2 +++ b/xml.cpp	Mon Sep 05 11:56:31 2005 +0000
    18.3 @@ -13,6 +13,7 @@
    18.4  
    18.5  static BranchObj *lastBranch;
    18.6  static FloatObj *lastFloat;
    18.7 +static LinkableMapObj *lastLMO;
    18.8  
    18.9  extern Settings settings;
   18.10  
   18.11 @@ -139,7 +140,7 @@
   18.12  			if (lmo && (typeid(*lmo) == typeid(BranchObj) ) 
   18.13  			        || (typeid(*lmo) == typeid(MapCenterObj) ) )
   18.14  			{
   18.15 -				lastBranch=(BranchObj*)(lmo);
   18.16 +				lastBranch=(BranchObj*)lmo;
   18.17  				if (loadMode==ImportAdd)
   18.18  				{
   18.19  					lastBranch->addBranch();
   18.20 @@ -197,6 +198,7 @@
   18.21  			{
   18.22  				lastBranch->addBranch();
   18.23  				lastBranch=lastBranch->getLastBranch();
   18.24 +				
   18.25  			} else
   18.26  				lastBranch->clear();
   18.27  		} else
   18.28 @@ -398,6 +400,9 @@
   18.29  
   18.30  bool mapBuilderHandler::readBranchAttr (const QXmlAttributes& a)
   18.31  {
   18.32 +	lastLMO=lastBranch;
   18.33 +	if (!readLinkAttr(a)) return false;
   18.34 +
   18.35  	bool okx,oky;
   18.36  	int x,y;
   18.37  	if (!a.value( "absPosX").isEmpty() && loadMode==NewMap && branchDepth<2) 
   18.38 @@ -423,6 +428,16 @@
   18.39  	return true;	
   18.40  }
   18.41  
   18.42 +bool mapBuilderHandler::readLinkAttr (const QXmlAttributes& a)
   18.43 +{
   18.44 +	if (!a.value( "hideLinkUnselected").isEmpty()) 
   18.45 +	{
   18.46 +		if (a.value ("hideLinkUnselected") =="true")
   18.47 +			if (lastLMO) lastLMO->setHideLinkUnselected(true);
   18.48 +	}	
   18.49 +	return true;	
   18.50 +}
   18.51 +
   18.52  bool mapBuilderHandler::readNoteAttr (const QXmlAttributes& a)
   18.53  {	// only for backward compatibility (<1.4.6). Use htmlnote now.
   18.54  	no.clear();
   18.55 @@ -471,6 +486,9 @@
   18.56  
   18.57  bool mapBuilderHandler::readFloatImageAttr (const QXmlAttributes& a)
   18.58  {
   18.59 +	lastLMO=lastFloat;
   18.60 +	if (!readLinkAttr(a)) return false;
   18.61 +	
   18.62  	if (!a.value( "useOrientation").isEmpty() ) 
   18.63  	{
   18.64  		if (a.value ("useOrientation") =="true")
    19.1 --- a/xml.h	Thu Sep 01 15:35:18 2005 +0000
    19.2 +++ b/xml.h	Mon Sep 05 11:56:31 2005 +0000
    19.3 @@ -27,6 +27,7 @@
    19.4  	void setTmpDir (QString);
    19.5  	void setLoadMode (const LoadMode &);
    19.6  	bool readBranchAttr (const QXmlAttributes&);
    19.7 +	bool readLinkAttr (const QXmlAttributes&);
    19.8  	bool readNoteAttr (const QXmlAttributes&);
    19.9  	bool readFloatImageAttr (const QXmlAttributes&);
   19.10  	bool readXLinkAttr (const QXmlAttributes&);