close-cd#I72D2H【文件管理器】切换搜索目录失败

This commit is contained in:
kylin 2023-09-06 18:23:44 +08:00
parent bc8724e254
commit fa86d8e6e1
2 changed files with 9 additions and 0 deletions

View File

@ -349,10 +349,16 @@ void TabWidget::initAdvanceSearch()
m_add_filter_button->setStyleSheet("border: 1px solid transparent;");
connect(m_home_search, &QPushButton::clicked, m_home_search, [=]() {
m_jumpToComputer = true;
switchSearchPath(false);
});
connect(m_current_search, &QPushButton::clicked, m_current_search, [=]() {
switchSearchPath(true);
if (!m_jumpToComputer) {
browsePath();
} else {
m_jumpToComputer = false;
}
});
connect(m_add_filter_button, &QPushButton::clicked, this, &TabWidget::addNewConditionBar);
@ -855,6 +861,7 @@ void TabWidget::updateSearchBar(bool showSearch)
m_add_filter_button->show();
m_search_bar_layout->setContentsMargins(10, 5, 10, 5);
updateSearchPathButton();
m_jumpToComputer = false;
switchSearchPath(true);
}
else
@ -864,6 +871,7 @@ void TabWidget::updateSearchBar(bool showSearch)
m_current_search->hide();
m_home_search->hide();
m_add_filter_button->hide();
m_jumpToComputer = false;
m_search_bar_layout->setContentsMargins(10, 0, 10, 0);
}

View File

@ -284,6 +284,7 @@ private:
bool m_show_search_bar = false;
bool m_search_child_flag = true;
bool m_isTabletMode = false;
bool m_jumpToComputer = false;
//Button size macro definition
//change height to 36 to ensure max size font can show complete, link to bug#58824