From 997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 02 Apr 2005 12:16:34 +0000 Subject: more fixes --- (limited to 'kaddressbook/views/colorlistbox.cpp') diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp index c243fa0..7386207 100644 --- a/kaddressbook/views/colorlistbox.cpp +++ b/kaddressbook/views/colorlistbox.cpp @@ -32,6 +32,7 @@ ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) { connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); + connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); setAcceptDrops( true); } @@ -74,7 +75,11 @@ QColor ColorListBox::color( uint index ) const return( black ); } } - +void ColorListBox::slotNewColor(QListBoxItem * i) +{ + if ( i ) + newColor( index( i ) ); +} void ColorListBox::newColor( int index ) { -- cgit v0.9.0.2