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();
}
}
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)