fix(frontend):mainwindow will hide after clicking the buttons on the create index dialog.

This commit is contained in:
JunjieBai 2024-01-03 16:28:18 +08:00 committed by iaom
parent 62b82585a9
commit 14a5ff23ce
1 changed files with 2 additions and 1 deletions

View File

@ -156,7 +156,8 @@ void MainWindow::initConnections()
setSearchMethodConfig(isCreateIndex, isAskAgain);
});
connect(m_askDialog, &CreateIndexAskDialog::focusChanged, this, [ & ] {
if (QApplication::activeWindow() != this) {
if (kdk::WindowManager::currentActiveWindow() != this->winId() &&
kdk::WindowManager::currentActiveWindow() != m_askDialog->winId()) {
this->tryHideMainwindow();
}
});