X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f0c8f31f407ecfce909060464c0ea655221cdab..6178debcd342963974dbdce6ac2ddb2fbe89e42a:/src/osx/carbon/colordlg.cpp diff --git a/src/osx/carbon/colordlg.cpp b/src/osx/carbon/colordlg.cpp index 1fe4e3d151..c62b2ae5e4 100644 --- a/src/osx/carbon/colordlg.cpp +++ b/src/osx/carbon/colordlg.cpp @@ -48,18 +48,20 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) int wxColourDialog::ShowModal() { RGBColor currentColor ; - - m_colourData.m_dataColour.GetRGBColor( currentColor ); + + m_colourData.m_dataColour.GetRGBColor( ¤tColor ); NColorPickerInfo info; OSStatus err ; memset(&info, 0, sizeof(info)) ; // TODO : use parent to determine better position and then kAtSpecifiedOrigin - info.placeWhere = kCenterOnMainScreen ; + info.placeWhere = kCenterOnMainScreen ; info.flags = kColorPickerDialogIsMoveable | kColorPickerDialogIsModal ; info.theColor.color.rgb.red = currentColor.red ; info.theColor.color.rgb.green = currentColor.green ; info.theColor.color.rgb.blue = currentColor.blue ; + wxDialog::OSXBeginModalDialog(); err = NPickColor(&info); + wxDialog::OSXEndModalDialog(); if ((err == noErr) && info.newColorChosen) { currentColor.red = info.theColor.color.rgb.red ;