Skip to content

Commit

Permalink
ticket#5273 Reset the filters before inserting new items to Variables…
Browse files Browse the repository at this point in the history
… Browser

The filters are applied back after insertion.
  • Loading branch information
adeas31 committed Jan 21, 2019
1 parent 18e18bd commit 55dabec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions OMEdit/OMEditGUI/Plotting/VariablesWidget.cpp
Expand Up @@ -1175,10 +1175,6 @@ VariablesWidget::VariablesWidget(QWidget *pParent)
void VariablesWidget::insertVariablesItemsToTree(QString fileName, QString filePath, QStringList variablesList,
SimulationOptions simulationOptions)
{
mpVariablesTreeView->setSortingEnabled(false);
/* In order to improve the response time of insertVariablesItems function we should clear the filter and collapse all the items. */
mpVariableTreeProxyModel->setFilterRegExp(QRegExp(""));
mpVariablesTreeView->collapseAll();
/* Show results in model diagram if it is present in ModelWidgetContainer
* and if switch to plotting perspective is disabled
*/
Expand All @@ -1201,6 +1197,10 @@ void VariablesWidget::insertVariablesItemsToTree(QString fileName, QString fileP
bool variableItemDeleted = false;
variableItemDeleted = mpVariablesTreeModel->removeVariableTreeItem(fileName);

mpVariablesTreeView->setSortingEnabled(false);
/* In order to improve the response time of insertVariablesItems function we should clear the filter and collapse all the items. */
mpVariableTreeProxyModel->setFilterRegExp(QRegExp(""));
mpVariablesTreeView->collapseAll();
/* add the plot variables */
mpVariablesTreeModel->insertVariablesItems(fileName, filePath, variablesList, simulationOptions);

Expand Down

0 comments on commit 55dabec

Please sign in to comment.