mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
clean file dialog after cancel
This commit is contained in:
@@ -82,12 +82,10 @@ bool DialogToolkit::FileDialog::closed()
|
|||||||
// check that file dialog thread finished
|
// check that file dialog thread finished
|
||||||
if (promises_.back().wait_for(timeout) == std::future_status::ready ) {
|
if (promises_.back().wait_for(timeout) == std::future_status::ready ) {
|
||||||
// get the filename from this file dialog
|
// get the filename from this file dialog
|
||||||
std::string string = promises_.back().get();
|
path_ = promises_.back().get();
|
||||||
if (!string.empty()) {
|
if (!path_.empty()) {
|
||||||
// selected a filename
|
|
||||||
path_ = string;
|
|
||||||
// save path location
|
// save path location
|
||||||
Settings::application.dialogRecentFolder[id_] = SystemToolkit::path_filename(string);
|
Settings::application.dialogRecentFolder[id_] = SystemToolkit::path_filename(path_);
|
||||||
}
|
}
|
||||||
// done with this file dialog
|
// done with this file dialog
|
||||||
promises_.pop_back();
|
promises_.pop_back();
|
||||||
|
|||||||
Reference in New Issue
Block a user