mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Minor change when reset the search in element collection
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4356 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -446,10 +446,11 @@ void ElementsCollectionWidget::reload()
|
||||
*/
|
||||
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 @@ void ElementsCollectionWidget::search(const QString &text)
|
||||
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())
|
||||
|
||||
Reference in New Issue
Block a user