# HG changeset patch # User insilmaril # Date 1238513770 0 # Node ID edb78a44240b006c751e0a8fbd57e12a540909d0 # Parent 008e72977ab860416a82f36704df6527e19be822 Removing branches and mapcenters works diff -r 008e72977ab8 -r edb78a44240b branchitem.cpp --- a/branchitem.cpp Thu Mar 26 07:50:32 2009 +0000 +++ b/branchitem.cpp Tue Mar 31 15:36:10 2009 +0000 @@ -18,7 +18,7 @@ QString BranchItem::saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset) { // Cloudy stuff can be hidden during exports - if (hidden) return ""; + if (hidden) return QString(); QString s,a; BranchObj *bo=(BranchObj*)lmo; diff -r 008e72977ab8 -r edb78a44240b branchobj.cpp --- a/branchobj.cpp Thu Mar 26 07:50:32 2009 +0000 +++ b/branchobj.cpp Tue Mar 31 15:36:10 2009 +0000 @@ -56,7 +56,7 @@ model->stopAnimation (this); } - cout << "Destr BranchObj of "<tmpUnscroll(); - /* moved to vymmodel or vymview... + //moved to vymmodel or vymview... // Show URL and link in statusbar QString status; if (!url.isEmpty()) status+="URL: "+url+" "; @@ -1414,20 +1415,20 @@ // Update actions model->updateActions(); +} */ -} +/* void BranchObj::unselect() //FIXME-3 should not be needed { + cout << "BO::unselect()\n"; LinkableMapObj::unselect(); // Delete any messages like vymLink in StatusBar mainWindow->statusMessage (""); //this causes segfault, when MainWindow is already gone in global destructor on quitting vym -/* // Save current note if (isNoteInEditor) getNoteFromTextEditor(); isNoteInEditor=false; -*/ // reset temporary unscroll, if we have scrolled parents somewhere if (parObj) ((BranchObj*)(parObj))->resetTmpUnscroll(); @@ -1438,6 +1439,7 @@ // unselect all buttons in toolbar standardFlagsDefault->updateToolbar(); } +*/ QString BranchObj::getSelectString() { diff -r 008e72977ab8 -r edb78a44240b branchobj.h --- a/branchobj.h Thu Mar 26 07:50:32 2009 +0000 +++ b/branchobj.h Tue Mar 31 15:36:10 2009 +0000 @@ -118,8 +118,6 @@ virtual QRectF getBBoxSizeWithChildren(); // return size of BBox including children virtual void calcBBoxSizeWithChildren(); // calc size of BBox including children recursivly - virtual void select(); - virtual void unselect(); virtual QString getSelectString(); virtual void setAnimation(const AnimPoint &ap); virtual bool animate(); diff -r 008e72977ab8 -r edb78a44240b mainwindow.cpp --- a/mainwindow.cpp Thu Mar 26 07:50:32 2009 +0000 +++ b/mainwindow.cpp Tue Mar 31 15:36:10 2009 +0000 @@ -1,5 +1,6 @@ #include "mainwindow.h" +#include #include #include @@ -2564,7 +2565,7 @@ urls.at(i); #endif p->start ("dcop",args); - //cout << qPrintable (args.join(" "))<waitForStarted() ) success=false; } if (!success) @@ -3483,6 +3484,7 @@ void Main::changeSelection (VymModel *model, const QItemSelection &newsel, const QItemSelection &oldsel) { //branchPropertyWindow->setModel (model ); //FIXME-1 this used to be called from BranchObj::select() + if (model && model==currentModel() ) { // NoteEditor @@ -3811,8 +3813,8 @@ void Main::testFunction1() { - if (!currentMapEditor()) return; - currentMapEditor()->testFunction1(); + //if (!currentMapEditor()) return; + //currentMapEditor()->testFunction1(); //editAttribute(); } diff -r 008e72977ab8 -r edb78a44240b version.h --- a/version.h Thu Mar 26 07:50:32 2009 +0000 +++ b/version.h Tue Mar 31 15:36:10 2009 +0000 @@ -7,7 +7,7 @@ #define __VYM_VERSION "1.13.0" //#define __VYM_CODENAME "Codename: RC-1" #define __VYM_CODENAME "Codename: development version" -#define __VYM_BUILD_DATE "2009-03-26" +#define __VYM_BUILD_DATE "2009-03-31" bool checkVersion(const QString &); diff -r 008e72977ab8 -r edb78a44240b vymmodel.cpp --- a/vymmodel.cpp Thu Mar 26 07:50:32 2009 +0000 +++ b/vymmodel.cpp Tue Mar 31 15:36:10 2009 +0000 @@ -2227,31 +2227,43 @@ if (!ix.isValid() ) return; QModelIndex parentIndex=parent(ix); - if (!parentIndex.isValid()) return; +/* + if (!parentIndex.isValid()) + { + cout << "VM::delete no valid parent ix\n"; + return; + } +*/ TreeItem *ti=bo->getTreeItem(); - if (selectionType()==TreeItem::MapCenter) //FIXME-1 VM still missing + if (selectionType()==TreeItem::MapCenter) { // BranchObj* par=(BranchObj*)(bo->getParObj()); //selection.unselect(); /* FIXME-1 VM Note: does saveStateRemovingPart work for MCO? (No parent!) saveStateRemovingPart (bo, QString ("Delete %1").arg(getObjectName(bo))); - */ - /* + */ + emit (layoutAboutToBeChanged() ); + + parentIndex=parent(index(ti)); + cout << "VM::delete ti="<