Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing SW Popup window doesn't dispose it properly #133

Open
spiriapbergeron opened this issue Sep 7, 2024 · 1 comment
Open

Closing SW Popup window doesn't dispose it properly #133

spiriapbergeron opened this issue Sep 7, 2024 · 1 comment

Comments

@spiriapbergeron
Copy link

There's a small logic inversion when closing a SwPopupWindow. This is causing duplicate windows being open when you want to reopen Popup "modeless" windows, when you try to close them yourself by calling Close() in the SwPopupWindow as opposed from pressing the [X] icon.

Also I guess the problem doesn't appear if it's a modal dialogbox because it must get closed.

But since I have a floating windows it was causing big problems.

I see this bug in both Master and Dev (I caught it in Dev).

https://github.com/xarial/xcad/blob/dev/src/SolidWorks/UI/SwPopupWindow.cs

Should be if (!m_IsDisposed), or, more clearly, if (m_IsDisposed == false)

    public override void Close()
    {
        **if (m_IsDisposed)** <----- ouch
        {
            m_IsDisposed = true;
            m_Form.Close();
        }
    }
@andrMollo
Copy link

Hi! I see this is fixed in the dev branch. The same is true for this #130. Any chance we can get it to main and then NuGet?

I tried to use the preview NuGet feed as explained here, but I can't get it to work. Is this still available?

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants