Removing map and HTML export fixed
authorinsilmaril
Wed Apr 07 10:45:24 2010 +0000 (2010-04-07)
changeset 844c48bb42fb977
parent 843 2d36a7bb0867
child 845 b98c1793bb8b
Removing map and HTML export fixed
exports.cpp
mainwindow.cpp
mapeditor.cpp
vym.changelog
vymmodel.cpp
     1.1 --- a/exports.cpp	Tue Apr 06 13:30:07 2010 +0000
     1.2 +++ b/exports.cpp	Wed Apr 07 10:45:24 2010 +0000
     1.3 @@ -711,7 +711,7 @@
     1.4  
     1.5  
     1.6  	dia.saveSettings();
     1.7 -	model->setExportMode (true);
     1.8 +	model->setExportMode (false);
     1.9  }
    1.10  
    1.11  ////////////////////////////////////////////////////////////////////////
     2.1 --- a/mainwindow.cpp	Tue Apr 06 13:30:07 2010 +0000
     2.2 +++ b/mainwindow.cpp	Wed Apr 07 10:45:24 2010 +0000
     2.3 @@ -2618,15 +2618,8 @@
     2.4  		vymViews.removeAt (tabWidget->currentIndex() );
     2.5  		tabWidget->removeTab (tabWidget->currentIndex() );
     2.6  
     2.7 -		// Remove mapEditor/model FIXME-3   Huh? seems to work now...
     2.8 -		// Better would be delete (me), but then we could have a Qt error:
     2.9 -		// "QObject: Do not delete object, 'MapEditor', during its event handler!"
    2.10 -		// So we only remove data now and call deconstructor when vym closes later
    2.11 -		// this needs to be moved to vymview...   me->clear();
    2.12 -		// some model->clear is needed to free up memory ...
    2.13 -
    2.14 -		delete (m->getMapEditor());
    2.15 -		delete (m);
    2.16 +		delete (m); // changing model still will try to update selection in editors, remove model first
    2.17 +		//delete (m->getMapEditor());
    2.18  
    2.19  		updateActions();
    2.20  	}
     3.1 --- a/mapeditor.cpp	Tue Apr 06 13:30:07 2010 +0000
     3.2 +++ b/mapeditor.cpp	Wed Apr 07 10:45:24 2010 +0000
     3.3 @@ -161,7 +161,7 @@
     3.4  MapEditor::~MapEditor()
     3.5  {
     3.6  	//qDebug() <<"Destructor MapEditor for "<<model->getMapName();
     3.7 -	model->unregisterEditor(this);
     3.8 +	//model->unregisterEditor(this);
     3.9  }
    3.10  
    3.11  VymModel* MapEditor::getModel()
     4.1 --- a/vym.changelog	Tue Apr 06 13:30:07 2010 +0000
     4.2 +++ b/vym.changelog	Wed Apr 07 10:45:24 2010 +0000
     4.3 @@ -1,3 +1,11 @@
     4.4 +-------------------------------------------------------------------
     4.5 +Wed Apr  7 12:01:25 CEST 2010 - vym@insilmaril.de
     4.6 +
     4.7 +- Version: 1.13.2   
     4.8 +- Bugfix: Segfault when removing a map
     4.9 +- Bugfix: Fixed regression in HTML export, which could lead to dataloss
    4.10 +          (not unhiding branches which are hidden during export)
    4.11 +
    4.12  -------------------------------------------------------------------
    4.13  Tue Mar 30 19:29:43 CEST 2010 - vym@insilmaril.de
    4.14  
     5.1 --- a/vymmodel.cpp	Tue Apr 06 13:30:07 2010 +0000
     5.2 +++ b/vymmodel.cpp	Wed Apr 07 10:45:24 2010 +0000
     5.3 @@ -67,10 +67,12 @@
     5.4  	autosaveTimer->stop();
     5.5  	fileChangedTimer->stop();
     5.6  	clear();
     5.7 +	if (mapEditor) delete (mapEditor);
     5.8  }	
     5.9  
    5.10  void VymModel::clear() 
    5.11  {
    5.12 +	unselect();
    5.13  	while (rootItem->childCount() >0)
    5.14  		deleteItem (rootItem->getChildNum(0) );
    5.15  }