vymview.cpp
changeset 745 2d4cc445a86a
parent 742 54d44ecd6097
child 746 ee6b0f3a4c2f
     1.1 --- a/vymview.cpp	Thu Mar 19 11:45:28 2009 +0000
     1.2 +++ b/vymview.cpp	Mon Mar 23 09:06:51 2009 +0000
     1.3 @@ -39,6 +39,9 @@
     1.4  	connect (
     1.5  		model, SIGNAL (selectionChanged(const QItemSelection &, const QItemSelection &)), 
     1.6  		me,SLOT (updateSelection(const QItemSelection &,const QItemSelection &)));
     1.7 +	connect (
     1.8 +		model, SIGNAL (newChildObject(QModelIndex) ),
     1.9 +		this,SLOT (updateChilds (QModelIndex) ) );
    1.10  
    1.11  	//me->viewport()->setFocus();	//FIXME needed?
    1.12  	me->setAntiAlias (mainWindow->isAliased());
    1.13 @@ -64,13 +67,16 @@
    1.14  }
    1.15  
    1.16  
    1.17 +void VymView::updateChilds (QModelIndex ix)
    1.18 +{
    1.19 +	treeview->setExpanded (ix,true);
    1.20 +}
    1.21 +
    1.22  void VymView::changeSelection (const QItemSelection &, const QItemSelection &)
    1.23  {
    1.24  	cout << "VymView::changeSelection (newsel,delsel)\n";
    1.25  	//treeview->expandAll();	//FIXME only for testing
    1.26  
    1.27 -	//((VymModel*)treeview->model())->select ();
    1.28 -
    1.29  	// Show URL and link in statusbar
    1.30  	QString status;
    1.31  	QString s=model->getURL();
    1.32 @@ -79,12 +85,9 @@
    1.33  	if (!s.isEmpty() ) status+="Link: "+s;
    1.34  	if (!status.isEmpty() ) mainWindow->statusMessage (status);
    1.35  
    1.36 -/* FIXME, was so far in BranchObj
    1.37 -	// Update Toolbar
    1.38 +	// Update Toolbar // FIXME, was so far in BranchObj
    1.39  	//updateFlagsToolbar();
    1.40  
    1.41 -*/
    1.42 -
    1.43  	// Update actions
    1.44  	mainWindow->updateActions();
    1.45  }