Fix wxTextEntryDialog parent when using wxTE_MULTILINE
Due to a clash between numeric values of wxTE_MULTILINE and wxDIALOG_NO_PARENT text entry dialogs for multiline text didn't have a parent. Fix this by always using a parent for them, which is better than never doing it, even if still not ideal. Closes #17136.
This commit is contained in:
parent
c9a3a23e5a
commit
d5453228aa
@ -71,7 +71,13 @@ bool wxTextEntryDialog::Create(wxWindow *parent,
|
||||
long style,
|
||||
const wxPoint& pos)
|
||||
{
|
||||
if ( !wxDialog::Create(GetParentForModalDialog(parent, style),
|
||||
// Do not pass style to GetParentForModalDialog() as wxDIALOG_NO_PARENT
|
||||
// has the same numeric value as wxTE_MULTILINE and so attempting to create
|
||||
// a dialog for editing multiline text would also prevent it from having a
|
||||
// parent which is undesirable. As it is, we can't create a text entry
|
||||
// dialog without a parent which is not ideal neither but is a much less
|
||||
// important problem.
|
||||
if ( !wxDialog::Create(GetParentForModalDialog(parent, 0),
|
||||
wxID_ANY, caption,
|
||||
pos, wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) )
|
||||
|
Loading…
Reference in New Issue
Block a user