Added persistant config for file source

This commit is contained in:
Ryzerth
2021-04-29 22:04:20 +02:00
parent bed0712be1
commit ce8b4ceb44
5 changed files with 22 additions and 6 deletions

View File

@@ -44,10 +44,11 @@ bool FolderSelect::render(std::string id) {
return _pathChanged;
}
void FolderSelect::setPath(std::string path) {
void FolderSelect::setPath(std::string path, bool markChanged) {
this->path = path;
std::string expandedPath = expandString(path);
pathValid = std::filesystem::is_directory(expandedPath);
if (markChanged) { pathChanged = true; }
strcpy(strPath, path.c_str());
}