fix some file selector glitches

This commit is contained in:
2024-02-08 18:11:51 +01:00
parent b56d581e4b
commit ff5dbaffc0
3 changed files with 12 additions and 5 deletions

View File

@ -737,7 +737,11 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
) {
if (ImGui::Button("save to")) {
_fss.requestFile(
[](const auto& path) -> bool { return std::filesystem::is_directory(path); },
[](std::filesystem::path& path) -> bool {
// remove file path
path.remove_filename();
return std::filesystem::is_directory(path);
},
[this, &reg, e](const auto& path) {
if (reg.valid(e)) { // still valid
// TODO: trim file?