mainwindow.cpp
changeset 844 c48bb42fb977
parent 842 bec082472471
child 845 b98c1793bb8b
     1.1 --- a/mainwindow.cpp	Tue Apr 06 13:30:07 2010 +0000
     1.2 +++ b/mainwindow.cpp	Wed Apr 07 10:45:24 2010 +0000
     1.3 @@ -2618,15 +2618,8 @@
     1.4  		vymViews.removeAt (tabWidget->currentIndex() );
     1.5  		tabWidget->removeTab (tabWidget->currentIndex() );
     1.6  
     1.7 -		// Remove mapEditor/model FIXME-3   Huh? seems to work now...
     1.8 -		// Better would be delete (me), but then we could have a Qt error:
     1.9 -		// "QObject: Do not delete object, 'MapEditor', during its event handler!"
    1.10 -		// So we only remove data now and call deconstructor when vym closes later
    1.11 -		// this needs to be moved to vymview...   me->clear();
    1.12 -		// some model->clear is needed to free up memory ...
    1.13 -
    1.14 -		delete (m->getMapEditor());
    1.15 -		delete (m);
    1.16 +		delete (m); // changing model still will try to update selection in editors, remove model first
    1.17 +		//delete (m->getMapEditor());
    1.18  
    1.19  		updateActions();
    1.20  	}