mainwindow.cpp
changeset 788 78ba80b54bc4
parent 787 c6bb4fdcc55f
child 789 d85834ad8c54
     1.1 --- a/mainwindow.cpp	Sat Aug 08 21:58:26 2009 +0000
     1.2 +++ b/mainwindow.cpp	Tue Aug 18 12:39:07 2009 +0000
     1.3 @@ -3359,7 +3359,7 @@
     1.4  	if (m && m->hasChanged() )
     1.5  		actionFileSave->setEnabled( true);
     1.6  	else	
     1.7 -		actionFileSave->setEnabled( true);
     1.8 +		actionFileSave->setEnabled( false);
     1.9  	if (m && m->isUndoAvailable())
    1.10  		actionUndo->setEnabled( true);
    1.11  	else	
    1.12 @@ -3376,7 +3376,13 @@
    1.13  		BranchItem *selbi=m->getSelectedBranch();
    1.14  		if (selti)
    1.15  		{
    1.16 -			if (selbi)
    1.17 +			if (selbi || selti->getType()==TreeItem::Image)
    1.18 +			{
    1.19 +				actionFormatHideLinkUnselected->setOn (((MapItem*)selti)->getHideLinkUnselected());
    1.20 +				actionFormatHideLinkUnselected->setEnabled (true);
    1.21 +			}
    1.22 +
    1.23 +			if (selbi)	// FIXME-4 many properties of former BranchObj are in TreeItem meanwhile...
    1.24  			{
    1.25  				// Take care of links  // updateActions: FIXME-1
    1.26  				/*
    1.27 @@ -3448,7 +3454,6 @@
    1.28  				actionToggleHideExport->setEnabled (true);	
    1.29  				actionToggleHideExport->setOn (selbi->hideInExport() );	
    1.30  
    1.31 -				actionFileSave->setEnabled (true);	
    1.32  				actionCopy->setEnabled (true);	
    1.33  				actionCut->setEnabled (true);	
    1.34  				if (!clipboardEmpty)
    1.35 @@ -3458,8 +3463,7 @@
    1.36  				for (int i=0; i<actionListBranches.size(); ++i)	
    1.37  					actionListBranches.at(i)->setEnabled(true);
    1.38  				actionDelete->setEnabled (true);
    1.39 -				//FIXME-2 actionFormatHideLinkUnselected->setOn (selection->getHideLinkUnselected());
    1.40 -			}
    1.41 +			}	// Branch
    1.42  			if ( selti->getType()==TreeItem::Image)
    1.43  			{
    1.44  				actionOpenURL->setEnabled (false);
    1.45 @@ -3475,15 +3479,12 @@
    1.46  				for (int i=0; i<actionListBranches.size(); ++i)	
    1.47  					actionListBranches.at(i)->setEnabled(false);
    1.48  				actionDelete->setEnabled (true);
    1.49 -				// FIXME-2 actionFormatHideLinkUnselected->setOn
    1.50 -				//	( selection->getHideLinkUnselected());
    1.51  				actionMoveUp->setEnabled (false);
    1.52  				actionMoveDown->setEnabled (false);
    1.53 -			}	//image
    1.54 +			}	// Image
    1.55  
    1.56  		} else
    1.57  		{	// !selti
    1.58 -			actionFileSave->setEnabled (false);	
    1.59  			actionCopy->setEnabled (false);	
    1.60  			actionCut->setEnabled (false);	
    1.61  			actionPaste->setEnabled (false);	
    1.62 @@ -3498,6 +3499,7 @@
    1.63  			actionDelete->setEnabled (false);
    1.64  			actionMoveUp->setEnabled (false);
    1.65  			actionMoveDown->setEnabled (false);
    1.66 +			actionFormatHideLinkUnselected->setEnabled (false);
    1.67  			actionSortChildren->setEnabled (false);
    1.68  			actionToggleHideExport->setEnabled (false);	
    1.69  		}