1.1 --- a/mapeditor.cpp Tue Mar 14 14:27:04 2006 +0000
1.2 +++ b/mapeditor.cpp Tue Mar 14 14:27:08 2006 +0000
1.3 @@ -66,6 +66,7 @@
1.4 extern QAction *actionEditOpenVymLink;
1.5 extern QAction *actionEditVymLink;
1.6 extern QAction *actionEditDeleteVymLink;
1.7 +extern QAction *actionEditToggleHideExport;
1.8 extern QAction *actionEditHeading;
1.9 extern QAction *actionEditDelete;
1.10 extern QAction *actionEditAddBranch;
1.11 @@ -801,6 +802,7 @@
1.12 reader.setErrorHandler( &handler );
1.13 handler.setMapEditor( this );
1.14 handler.setTmpDir (filePath.left(filePath.findRev("/",-1))); // needed to load files with rel. path
1.15 + handler.setInputFile (file.name());
1.16 handler.setLoadMode (lmode);
1.17 blockSaveState=true;
1.18 bool ok = reader.parse( source );
1.19 @@ -2073,7 +2075,7 @@
1.20 {
1.21 saveState(selection); //TODO undoCommand
1.22 BranchObj *bo=(BranchObj*)selection;
1.23 - bo->setColor(actColor, false); // color links, color childs
1.24 + bo->setColor(actColor); // color branch
1.25 }
1.26 }
1.27 }
1.28 @@ -2087,7 +2089,7 @@
1.29 {
1.30 saveState(selection); //TODO undoCommand
1.31 BranchObj *bo=(BranchObj*)selection;
1.32 - bo->setColor(actColor, true); // color links, color childs
1.33 + bo->setColorChilds(actColor); // color links, color childs
1.34 }
1.35 }
1.36 }
1.37 @@ -2295,6 +2297,23 @@
1.38 }
1.39 }
1.40
1.41 +void MapEditor::toggleHideExport()
1.42 +{
1.43 + if (selection && (typeid(*selection) == typeid(BranchObj) ||
1.44 + typeid(*selection) == typeid(MapCenterObj)) //||
1.45 +// (typeid(*selection)==typeid(FloatImageObj))
1.46 + )
1.47 + {
1.48 + saveState(); //TODO undoCommand
1.49 + BranchObj *bo=(BranchObj*)selection;
1.50 + bo->setHideInExport(actionEditToggleHideExport->isOn());
1.51 + updateActions();
1.52 + mapCenter->reposition();
1.53 + adjustCanvasSize();
1.54 + canvas()->update();
1.55 + }
1.56 +}
1.57 +
1.58 QString MapEditor::getVymLink()
1.59 {
1.60 if (selection && (typeid(*selection) == typeid(BranchObj) ||
1.61 @@ -2463,6 +2482,8 @@
1.62 actionEditOpenVymLink->setEnabled (true);
1.63 actionEditDeleteVymLink->setEnabled (true);
1.64 }
1.65 + actionEditToggleHideExport->setEnabled (true);
1.66 + actionEditToggleHideExport->setOn (bo->hideInExport() );
1.67
1.68 actionEditCopy->setEnabled (true);
1.69 actionEditCut->setEnabled (true);
1.70 @@ -2499,10 +2520,11 @@
1.71 actionEditOpenURL->setEnabled (false);
1.72 actionEditOpenVymLink->setEnabled (false);
1.73 actionEditDeleteVymLink->setEnabled (false);
1.74 + actionEditToggleHideExport->setEnabled (false);
1.75
1.76 actionEditCopy->setEnabled (true);
1.77 actionEditCut->setEnabled (true);
1.78 - actionEditPaste->setEnabled (false); //FIXME
1.79 + actionEditPaste->setEnabled (false);
1.80 for (a=actionListBranches.first();a;a=actionListBranches.next())
1.81 a->setEnabled(false);
1.82 actionEditDelete->setEnabled (true);
1.83 @@ -2835,7 +2857,7 @@
1.84 dst->addBranch();
1.85 bo=dst->getLastBranch();
1.86 bo->setHeading (fi->fileName() );
1.87 - bo->setColor (QColor("blue"),false);
1.88 + bo->setColor (QColor("blue"));
1.89 bo->toggleScroll();
1.90 if ( !d.cd(fi->fileName()) )
1.91 QMessageBox::critical (0,tr("Critical Import Error"),tr("Cannot find the directory %1").arg(fi->fileName()));
1.92 @@ -2858,7 +2880,7 @@
1.93 dst->addBranch();
1.94 bo=dst->getLastBranch();
1.95 bo->setHeading (fi->fileName() );
1.96 - bo->setColor (QColor("black"),false);
1.97 + bo->setColor (QColor("black"));
1.98 if (fi->fileName().right(4) == ".vym" )
1.99 bo->setVymLink (fi->filePath());
1.100
1.101 @@ -3094,6 +3116,8 @@
1.102 } else
1.103 if (foname=="note")
1.104 mainWindow->windowToggleNoteEditor();
1.105 + else
1.106 + if (foname=="hideInExport") toggleHideExport();
1.107 }
1.108 }
1.109
1.110 @@ -3295,12 +3319,12 @@
1.111 {
1.112 if (e->state() & QMouseEvent::ShiftButton)
1.113 {
1.114 - ((BranchObj*)selection)->setColor (((BranchObj*)(dst))->getColor(),false);
1.115 + ((BranchObj*)selection)->setColor (((BranchObj*)(dst))->getColor());
1.116 ((BranchObj*)selection)->setLinkColor ();
1.117 }
1.118 else
1.119 {
1.120 - ((BranchObj*)selection)->setColor (((BranchObj*)(dst))->getColor(),true);
1.121 + ((BranchObj*)selection)->setColorChilds (((BranchObj*)(dst))->getColor());
1.122 ((BranchObj*)selection)->setLinkColor ();
1.123 }
1.124 }