UI: Options: AppGroup: Fix "Select File" insertion to current field

This commit is contained in:
Nodir Temirkhodjaev 2023-11-29 12:57:08 +03:00
parent ab7ef64bba
commit b8e6585e27

View File

@ -564,11 +564,12 @@ void ApplicationsPage::setupSplitter()
void ApplicationsPage::setupSplitterButtons()
{
m_btSelectFile = ControlUtil::createSplitterButton(":/icons/folder.png", [&] {
auto area = m_allowSplitter->handle()->currentTextArea();
const auto filePaths = DialogUtil::getOpenFileNames(
m_btSelectFile->text(), tr("Programs (*.exe);;All files (*.*)"));
if (!filePaths.isEmpty()) {
auto area = m_allowSplitter->handle()->currentTextArea();
TextAreaUtil::appendText(area, filePaths.join('\n'));
}
});