[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

RE: [XaraXtreme-dev] Tabbed dialogs





--On 01 May 2006 03:43 +0100 Luke Hart <LukeH@xxxxxxxx> wrote:

In wxOil/dlgmgr.cpp, in DialogManager::Create(),  you've added this:

      if( ok &&
              Mode == MODAL &&
              ( pDialogWnd->IsKindOf( CLASSINFO(wxDialog) ) ||
                DlgOp->IS_KIND_OF(DialogTabOp) ) ) // <--- this line
      {
              ((wxDialog *) pDialogWnd)->ShowModal();
      }

Why do a ShowModal() on a DialogTabOp() if it is non-modal? Surely
it should be shown as per any non-modal tabbed dialog?

Alex,

I don't think think it will be called if Mode isn't MODAL. I think the
test is
"if OK and MODAL and ( wxDialog or DialogTabOP )". Unless you've actually
seen

You are quite right. HOWEVER it then has a more serious problem.
If pDialogWnd fails the IsKindOf test, that's because it is a wxPanel,
in which case it has no ShowModal method to call - your cast will
surely just make it jump into the middle of nowhere?

This would only be a problem if the panes themselves were marked modal,
as I presume the outer dialog is a wxDialog. But the test would
seem not to be a great idea.

Alex