WindowsDemo fix


#1

Your WindowsDemo will choke if you quit the demo app while the DialogWindow is still open

Simple fix:

Add a private member variable:

DialogWindow* dialogWindow;

In the constructor:

WindowsDemo() : dialogWindow (nullptr)
{

and in the Destructor:

    if (dialogWindow != nullptr)
        {
        if (dialogWindow->isCurrentlyModal(true))
            {
            dialogWindow->exitModalState (0);

            delete dialogWindow;
            }
        }

Rail


#2

Oh… and in:

void showDialogWindow()

change the last two lines to:

    dialogWindow = options.launchAsync();
    dialogWindow->centreWithSize (300, 200);

Rail


#3

Thanks Rail! It’s on develop now.