Merge pull request #9962 from ferreus/dev/vladimir_fix_8768

Fix #8768: Show() on already open modal
This commit is contained in:
Cheng Zhao 2017-07-17 10:49:18 +03:00 committed by GitHub
commit a43553aa25

View file

@ -374,7 +374,8 @@ bool NativeWindowViews::IsFocused() {
}
void NativeWindowViews::Show() {
if (is_modal() && NativeWindow::parent())
if (is_modal() && NativeWindow::parent() &&
!window_->native_widget_private()->IsVisible())
static_cast<NativeWindowViews*>(NativeWindow::parent())->SetEnabled(false);
window_->native_widget_private()->ShowWithWindowState(GetRestoredState());