X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34138703c3997ce676a1e713d9ff9eb020640da7..37cda9cb1c55bdbb10d017039ae5920f440ad3b0:/src/stubs/dialog.cpp diff --git a/src/stubs/dialog.cpp b/src/stubs/dialog.cpp index c278536c60..7d6d99744d 100644 --- a/src/stubs/dialog.cpp +++ b/src/stubs/dialog.cpp @@ -164,20 +164,13 @@ void wxDialog::Centre(int direction) int x_offset,y_offset ; int display_width, display_height; int width, height, x, y; - wxFrame *frame ; - if (direction & wxCENTER_FRAME) + wxWindow *parent = GetParent(); + if ((direction & wxCENTER_FRAME) && parent) { - frame = (wxFrame*)GetParent() ; - if (frame) - { - frame->GetPosition(&x_offset,&y_offset) ; - frame->GetSize(&display_width,&display_height) ; - } + parent->GetPosition(&x_offset,&y_offset) ; + parent->GetSize(&display_width,&display_height) ; } else - frame = NULL ; - - if (frame==NULL) { wxDisplaySize(&display_width, &display_height); x_offset = 0 ; @@ -289,3 +282,6 @@ void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event) Refresh(); } +void wxDialog::Fit() +{ +}