From d6ff6ba314b159a16c0b4adca4ea1593010fb082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Wed, 1 Jul 2009 10:12:58 +0000 Subject: [PATCH] [GB.QT4] * BUG: Reparenting a window does not prevent the Open event to be raised in some cases. git-svn-id: svn://localhost/gambas/trunk@2059 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.qt4/src/CMenu.cpp | 3 ++- gb.qt4/src/CWindow.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gb.qt4/src/CMenu.cpp b/gb.qt4/src/CMenu.cpp index ef1da5343..44bffd260 100644 --- a/gb.qt4/src/CMenu.cpp +++ b/gb.qt4/src/CMenu.cpp @@ -649,7 +649,8 @@ void CMenu::slotTriggered(QAction *action) void CMenu::slotShown(void) { GET_MENU_SENDER(menu); - GB.Raise(menu, EVENT_Show, 0); + //if (GB.CanRaise(menu, EVENT_Show)) + GB.Raise(menu, EVENT_Show, 0); } void CMenu::slotHidden(void) diff --git a/gb.qt4/src/CWindow.cpp b/gb.qt4/src/CWindow.cpp index bc0938cbc..314c0a0ce 100644 --- a/gb.qt4/src/CWindow.cpp +++ b/gb.qt4/src/CWindow.cpp @@ -2201,7 +2201,7 @@ void MyMainWindow::doReparent(QWidget *parent, Qt::WindowFlags f, const QPoint & //qDebug("--> isVisible = %d isHidden = %d", isVisible(), isHidden()); - /*if (THIS->embedded && !THIS->hidden) + if (THIS->embedded && !THIS->hidden) { #if DEBUG_WINDOW qDebug("post show_later %s %p", GB.GetClassName(THIS), THIS); @@ -2210,7 +2210,7 @@ void MyMainWindow::doReparent(QWidget *parent, Qt::WindowFlags f, const QPoint & //GB.Post((void (*)())show_later, (intptr_t)THIS); show_later(THIS); //WIDGET->show(); - }*/ + } //qDebug("new parent = %p", parentWidget()); }