[qet] [4356] Minor change when reset the search in element collection

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4356
Author:   blacksun
Date:     2016-02-28 12:02:30 +0100 (Sun, 28 Feb 2016)
Log Message:
-----------
Minor change when reset the search in element collection

Modified Paths:
--------------
    trunk/sources/ElementsCollection/elementscollectionwidget.cpp

Modified: trunk/sources/ElementsCollection/elementscollectionwidget.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementscollectionwidget.cpp	2016-02-26 09:58:55 UTC (rev 4355)
+++ trunk/sources/ElementsCollection/elementscollectionwidget.cpp	2016-02-28 11:02:30 UTC (rev 4356)
@@ -446,10 +446,11 @@
  */
 void ElementsCollectionWidget::search(const QString &text)
 {
-		//Reset the tree
+		//Reset the search
 	if (text.isEmpty())
 	{
 		QModelIndex current_index = m_tree_view->currentIndex();
+		m_tree_view->reset();
 
 		if (m_showed_index.isValid())
 		{
@@ -457,10 +458,7 @@
 			showAndExpandItem(m_showed_index, true, true);
 		}
 		else
-		{
-			m_tree_view->reset();
 			expandFirstItems();
-		}
 
 			//Expand the tree and scroll to the last selected index
 		if (current_index.isValid())


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/