Skip to content
Permalink
Browse files

fixed #3839

  • Loading branch information
blazek committed May 25, 2011
1 parent f88f721 commit 4070354d5f0a8f401d3cdacac82facc46c3598b9
Showing with 12 additions and 20 deletions.
  1. +12 −20 src/app/qgscustomization.cpp
@@ -838,30 +838,22 @@ void QgsCustomization::removeFromLayout( QLayout *theLayout, QWidget * theWidget

void QgsCustomization::preNotify( QObject * receiver, QEvent * event, bool * done )
{
QWidget *widget = qobject_cast<QWidget*>( receiver );

if ( mEnabled && widget && event->type() == QEvent::Show )
if ( event->type() == QEvent::Show || event->type() == QEvent::MouseButtonPress )
{
QgsCustomization::customizeWidget( widget, event );
if ( widget->inherits( "QDialog" ) && pDialog && pDialog->isVisible() )
QWidget *widget = qobject_cast<QWidget*>( receiver );

if ( mEnabled && widget && event->type() == QEvent::Show )
{
// TODO?
QgsCustomization::customizeWidget( widget, event );
}
}
else if ( mEnabled && widget && ( event->type() == QEvent::Hide || event->type() == QEvent::Close ) )
{
if ( widget->inherits( "QDialog" ) && pDialog && pDialog->isVisible() )
else if ( widget && event->type() == QEvent::MouseButtonPress )
{
// TODO?
}
}
else if ( widget && event->type() == QEvent::MouseButtonPress )
{
QgsDebugMsg( "click" );
if ( pDialog && pDialog->isVisible() )
{
QMouseEvent *e = static_cast<QMouseEvent*>( event );
*done = pDialog->switchWidget( widget, e );
QgsDebugMsg( "click" );
if ( pDialog && pDialog->isVisible() )
{
QMouseEvent *e = static_cast<QMouseEvent*>( event );
*done = pDialog->switchWidget( widget, e );
}
}
}
// Shortcut arrives only if it is defined and used in main app

0 comments on commit 4070354

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