2

Closed

Double Deactivations from Screen when using Conductor One Active

description

In the attached WPF application, a double deactivation is obtained for the active tab screen when the application is closed.

Reproduce as follows:
Open, build and run solution. A window will open.
Press button and OK to activation dialog, and three tabs will be created.
Without doing anything else, close application using the window close icon.
You will receive two sequential deactivation dialogs.

Zip includes Caliburn.Micro code. Open Screen.cs
Uncomment code as shown below, and when run again only one devactivation will be obtained.
    void IDeactivate.Deactivate(bool close)
    {
        if (!IsActive && !IsInitialized)
        {
            return;
        }

        //JSRSOFT uncomment to prevent double deactivations
        //if (!IsActive)
        //{
        //    return;
        //}

file attachments

Closed Sep 3, 2012 at 11:28 PM by EisenbergEffect
Fixed in a45e1f27e062

comments

tibel wrote Aug 15, 2012 at 1:52 PM

Does somebody know why deactivate is only omitted when IsInitialized == false?