fix freezing of filebox when opens in other thread
This commit is contained in:
parent
0477abfafd
commit
738178dec3
@ -1044,10 +1044,13 @@ namespace nana
|
|||||||
if (!impl_->open_or_save)
|
if (!impl_->open_or_save)
|
||||||
ofn.Flags = OFN_OVERWRITEPROMPT; //Overwrite prompt if it is save mode
|
ofn.Flags = OFN_OVERWRITEPROMPT; //Overwrite prompt if it is save mode
|
||||||
ofn.Flags |= OFN_NOCHANGEDIR;
|
ofn.Flags |= OFN_NOCHANGEDIR;
|
||||||
|
|
||||||
if(FALSE == (impl_->open_or_save ? ::GetOpenFileName(&ofn) : ::GetSaveFileName(&ofn)))
|
{
|
||||||
return false;
|
internal_revert_guard revert;
|
||||||
|
if (FALSE == (impl_->open_or_save ? ::GetOpenFileName(&ofn) : ::GetSaveFileName(&ofn)))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
wfile.resize(std::wcslen(wfile.data()));
|
wfile.resize(std::wcslen(wfile.data()));
|
||||||
impl_->file = to_utf8(wfile);
|
impl_->file = to_utf8(wfile);
|
||||||
#elif defined(NANA_POSIX)
|
#elif defined(NANA_POSIX)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user