CVS commit by aseigo: the great grandparent of the button is not always a container area! this makes kicker work once again on my work box. no idea why it works at home or on wicky's machine or on anyone else but not this one ;-) in any case the fix was trivial once i figured it out. M +18 -7 panelbuttonbase.cpp 1.54 --- kdebase/kicker/buttons/panelbuttonbase.cpp #1.53:1.54 @@ -251,5 +251,7 @@ void PanelButtonBase::setArrowDirection( void PanelButtonBase::setBackground() { - if( !parent() ) { //parent() is null for ZoomButtons + if (!parent()) + { + //parent() is null for ZoomButtons _bg = QPixmap(); return; @@ -257,6 +259,13 @@ void PanelButtonBase::setBackground() // inheritance is ButtonContainer - ScrollView - ContainerArea - ContainerArea* area = static_cast(parent()->parent()->parent()); - if (!area->transparent()) + ContainerArea* area = 0; + QObject* ancestor = parent(); + while (ancestor && !area) + { + area = dynamic_cast(ancestor); + ancestor = ancestor->parent(); + } + + if (area && !area->transparent()) { _bg = QPixmap(); @@ -263,11 +272,13 @@ void PanelButtonBase::setBackground() return; } + // Get the pixmap from the container area object - const QPixmap* containerBG = area->completeBackgroundPixmap(); + const QPixmap* containerBG = area ? area->completeBackgroundPixmap() : 0; // Make sure the background pixmap exists - if ( containerBG ) + if (containerBG) + { + if(containerBG->isNull()) { - if( containerBG->isNull() ) { _bg = QPixmap(); return;