Skip to content
Permalink
Browse files

take III on #5597

  • Loading branch information
jef-n committed May 23, 2012
1 parent b600ff7 commit 860f66d3b48386a2c9dc41cdbdae794a9e482ffc
Showing with 3 additions and 6 deletions.
  1. +0 −5 src/app/qgscustomization.cpp
  2. +3 −1 src/core/qgsapplication.cpp
@@ -857,11 +857,6 @@ void QgsCustomization::removeFromLayout( QLayout *theLayout, QWidget * theWidget

void QgsCustomization::preNotify( QObject * receiver, QEvent * event, bool * done )
{
// Crashes especially on Mac if we're not in the main/UI thread, see #5597
if ( QCoreApplication::instance()->thread() != QThread::currentThread() )
{
return;
}
if ( event->type() == QEvent::Show || event->type() == QEvent::MouseButtonPress )
{
QWidget *widget = qobject_cast<QWidget*>( receiver );
@@ -200,7 +200,9 @@ bool QgsApplication::event( QEvent * event )
bool QgsApplication::notify( QObject * receiver, QEvent * event )
{
bool done = false;
emit preNotify( receiver, event, &done );
// Crashes in customization (especially on Mac), if we're not in the main/UI thread, see #5597
if ( thread() == receiver->thread() )
emit preNotify( receiver, event, &done );

if ( done )
return true;

0 comments on commit 860f66d

Please sign in to comment.
You can’t perform that action at this time.