Browse Source

Fix invalid "! doLoop" assertion on plugin UI close

gh-pages
falkTX 10 years ago
parent
commit
10c98a1703
1 changed files with 12 additions and 2 deletions
  1. +12
    -2
      dgl/src/Window.cpp

+ 12
- 2
dgl/src/Window.cpp View File

@@ -131,7 +131,7 @@ struct Window::PrivateData {
#endif #endif
leakDetector_PrivateData() leakDetector_PrivateData()
{ {
if (parentId != 0)
if (fUsingEmbed)
{ {
DBG("Creating embedded window..."); DBGF; DBG("Creating embedded window..."); DBGF;
puglInitWindowParent(fView, parentId); puglInitWindowParent(fView, parentId);
@@ -143,7 +143,7 @@ struct Window::PrivateData {


init(); init();


if (parentId != 0)
if (fUsingEmbed)
{ {
DBG("NOTE: Embed window is always visible and non-resizable\n"); DBG("NOTE: Embed window is always visible and non-resizable\n");
puglShowWindow(fView); puglShowWindow(fView);
@@ -206,6 +206,12 @@ struct Window::PrivateData {
//fOnModal = false; //fOnModal = false;
fWidgets.clear(); fWidgets.clear();


if (fUsingEmbed)
{
puglHideWindow(fView);
fApp.pData->oneHidden();
}

if (fSelf != nullptr) if (fSelf != nullptr)
{ {
fApp.pData->windows.remove(fSelf); fApp.pData->windows.remove(fSelf);
@@ -235,6 +241,10 @@ struct Window::PrivateData {
void close() void close()
{ {
DBG("Window close\n"); DBG("Window close\n");

if (fUsingEmbed)
return;

setVisible(false); setVisible(false);


if (! fFirstInit) if (! fFirstInit)


Loading…
Cancel
Save