mainwindow.cpp
changeset 834 0fad394bc330
parent 833 bfacef6f29c1
child 835 31841b366d5e
     1.1 --- a/mainwindow.cpp	Tue Mar 09 13:09:05 2010 +0000
     1.2 +++ b/mainwindow.cpp	Wed Mar 10 15:36:19 2010 +0000
     1.3 @@ -1921,11 +1921,12 @@
     1.4  	return NULL;	
     1.5  }
     1.6  
     1.7 -VymModel* Main::getModel(uint id) const	//FIXME-2 id not used
     1.8 +VymModel* Main::getModel(uint id) const	
     1.9  {
    1.10  	// Used in BugAgent
    1.11 -	if ( tabWidget->currentPage())
    1.12 -		return vymViews.at(tabWidget->currentIndex())->getModel();
    1.13 +	for (int i=0; i<vymViews.count();i++)
    1.14 +		if (vymViews.at(i)->getModel()->getID()==id)
    1.15 +			return vymViews.at(i)->getModel();
    1.16  	return NULL;	
    1.17  }
    1.18  
    1.19 @@ -3961,28 +3962,10 @@
    1.20  	if (!currentMapEditor()) return;
    1.21  	currentMapEditor()->testFunction1();
    1.22  */
    1.23 -/*
    1.24 -
    1.25 -	VymModel *m=currentModel();
    1.26 -	if (!m) return;
    1.27 -
    1.28 -	bool ok;
    1.29 -	QString text = QInputDialog::getText(
    1.30 -			"VYM", "Enter Filter:", QLineEdit::Normal,	// FIXME-3 no translation yet
    1.31 -			m->getSortFilter(), &ok, NULL);
    1.32 -	if ( ok) 
    1.33 -		// user entered something and pressed OK
    1.34 -		m->setSortFilter (text);
    1.35 -*/
    1.36  }
    1.37  
    1.38  void Main::testFunction2()
    1.39  {
    1.40 -	findResultWidget->setModel (currentModel());
    1.41 -	findResultWidget->addResult ("Test",currentModel()->getSelectedItem());
    1.42 -	
    1.43 -	return;
    1.44 -
    1.45  	if (!currentMapEditor()) return;
    1.46  	currentMapEditor()->testFunction2();
    1.47  }