summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/window/dialog.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index a2dbdac3ad4e..6f4bb7ec2303 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -364,8 +364,9 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
// Now, all Dialogs are per default system windows !!!
nStyle |= WB_SYSTEMWINDOW;
- // parent is NULL: get the default Dialog parent
- if ( !pParent )
+ if (eFlag == InitFlag::NoParent)
+ pParent = NULL;
+ else if (!pParent) // parent is NULL: get the default Dialog parent
{
pParent = Application::GetDefDialogParent();
if ( !pParent && !(nStyle & WB_SYSTEMWINDOW) )
@@ -392,8 +393,6 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
}
}
}
- else if( eFlag == InitFlag::Default )
- pParent = NULL;
if ( !pParent || (nStyle & WB_SYSTEMWINDOW) ||
(pParent->mpWindowImpl->mpFrameData->mbNeedSysWindow && !(nSysWinMode & SystemWindowFlags::NOAUTOMODE)) ||