fix freezing of filebox when opens in other thread

This commit is contained in:
Jinhao 2016-11-14 06:57:42 +08:00
parent 0477abfafd
commit 738178dec3

View File

@ -1045,8 +1045,11 @@ namespace nana
ofn.Flags = OFN_OVERWRITEPROMPT; //Overwrite prompt if it is save mode
ofn.Flags |= OFN_NOCHANGEDIR;
if(FALSE == (impl_->open_or_save ? ::GetOpenFileName(&ofn) : ::GetSaveFileName(&ofn)))
{
internal_revert_guard revert;
if (FALSE == (impl_->open_or_save ? ::GetOpenFileName(&ofn) : ::GetSaveFileName(&ofn)))
return false;
}
wfile.resize(std::wcslen(wfile.data()));
impl_->file = to_utf8(wfile);