vymview.cpp
changeset 767 6d2b32f305f9
parent 763 8c028a5d9083
child 769 a6931cd6309a
     1.1 --- a/vymview.cpp	Thu May 07 08:48:53 2009 +0000
     1.2 +++ b/vymview.cpp	Wed May 13 08:26:27 2009 +0000
     1.3 @@ -49,12 +49,6 @@
     1.4  		model, SIGNAL (selectionChanged(const QItemSelection &, const QItemSelection &)), 
     1.5  		mapEditor,SLOT (updateSelection(const QItemSelection &,const QItemSelection &)));
     1.6  
     1.7 -		/*
     1.8 -	connect (
     1.9 -		model, SIGNAL (newChildObject(QModelIndex) ),
    1.10 -		this,SLOT (updateChilds (QModelIndex) ) );
    1.11 -*/
    1.12 -
    1.13  	connect (
    1.14  		model, SIGNAL (noteHasChanged(QModelIndex) ),
    1.15  		mainWindow, SLOT (updateNoteEditor (QModelIndex) ) );
    1.16 @@ -91,13 +85,6 @@
    1.17  	return NULL;
    1.18  }
    1.19  
    1.20 -
    1.21 -void VymView::updateChilds (QModelIndex ix)		//FIXME-4 not needed?
    1.22 -{
    1.23 -	cout << "VV::updateChilds \n";
    1.24 -	//treeview->setExpanded (ix,true);	// This is expensive...
    1.25 -}
    1.26 -
    1.27  void VymView::changeSelection (const QItemSelection &newsel, const QItemSelection &oldsel)
    1.28  {
    1.29  	/*
    1.30 @@ -112,6 +99,7 @@
    1.31  
    1.32  	// Notify mainwindow to update satellites like NoteEditor, if needed (model==currenModel...)
    1.33  	mainWindow->changeSelection (model,newsel,oldsel);	// FIXME-3 maybe connect VymModel <-> MainWindow directly?
    1.34 +	showSelection();
    1.35  }
    1.36  
    1.37  void VymView::expandAll()
    1.38 @@ -128,7 +116,7 @@
    1.39  	);
    1.40  
    1.41  	LinkableMapObj* lmo=model->getSelectedLMO();
    1.42 -	if (lmo)
    1.43 -		mapEditor->ensureVisible(lmo->getBBox() );
    1.44 +	if (lmo) 
    1.45 +		mapEditor->setScrollBarPosTarget (lmo->getBBox() );
    1.46  }
    1.47