Do not activate button pressed animation when no action is triggered when doing so (e.g right button press on Window-Close)

svn path=/trunk/KDE/kdebase/workspace/; revision=1073152
This commit is contained in:
Hugo Pereira Da Costa 2010-01-11 18:32:56 +00:00
parent df2b3170cb
commit e2240a8427

View file

@ -160,8 +160,11 @@ namespace Oxygen
void OxygenButton::mousePressEvent(QMouseEvent *e)
{
status_ = Oxygen::Pressed;
update();
if( type_ == ButtonMax || e->button() == Qt::LeftButton )
{
status_ = Oxygen::Pressed;
update();
}
KCommonDecorationButton::mousePressEvent(e);
}