mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-18 05:50:39 -04:00
fix the bug where a filter is applied in friends file list even if view mode is tree and search box is hidden. Problem was: SharedFilesDialog::FilterItems() is called from multiple places. The check if we should filter or not is now in the filter function itself.
This commit is contained in:
parent
a118870db9
commit
b125cb1f1e
1 changed files with 6 additions and 4 deletions
|
@ -363,10 +363,7 @@ void SharedFilesDialog::changeCurrentViewModel(int viewTypeIndex)
|
||||||
|
|
||||||
ui.dirTreeView->header()->headerDataChanged(Qt::Horizontal, COLUMN_NAME, COLUMN_DIR) ;
|
ui.dirTreeView->header()->headerDataChanged(Qt::Horizontal, COLUMN_NAME, COLUMN_DIR) ;
|
||||||
|
|
||||||
#ifdef DONT_USE_SEARCH_IN_TREE_VIEW
|
FilterItems();
|
||||||
if(viewTypeIndex == VIEW_TYPE_FLAT)
|
|
||||||
#endif
|
|
||||||
FilterItems();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalSharedFilesDialog::showProperColumns()
|
void LocalSharedFilesDialog::showProperColumns()
|
||||||
|
@ -1017,6 +1014,11 @@ void SharedFilesDialog::startFilter()
|
||||||
|
|
||||||
void SharedFilesDialog::FilterItems()
|
void SharedFilesDialog::FilterItems()
|
||||||
{
|
{
|
||||||
|
#ifdef DONT_USE_SEARCH_IN_TREE_VIEW
|
||||||
|
if(proxyModel == tree_proxyModel)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
QString text = ui.filterPatternLineEdit->text();
|
QString text = ui.filterPatternLineEdit->text();
|
||||||
|
|
||||||
setCursor(Qt::WaitCursor);
|
setCursor(Qt::WaitCursor);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue