Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 55 |
1 files changed, 44 insertions, 11 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index e333b17..00335ae 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp | |||
@@ -125,3 +125,4 @@ AbTable::AbTable( const QValueList<int> order, QWidget *parent, const char *name | |||
125 | enablePainting( true ), | 125 | enablePainting( true ), |
126 | columnVisible( true ) | 126 | columnVisible( true ), |
127 | countNested( 0 ) | ||
127 | { | 128 | { |
@@ -164,3 +165,3 @@ void AbTable::setContacts( const OContactAccess::List& viewList ) | |||
164 | setSorting( false ); | 165 | setSorting( false ); |
165 | setUpdatesEnabled( FALSE ); | 166 | setPaintingEnabled( FALSE ); |
166 | 167 | ||
@@ -172,4 +173,2 @@ void AbTable::setContacts( const OContactAccess::List& viewList ) | |||
172 | 173 | ||
173 | setUpdatesEnabled( TRUE ); | ||
174 | |||
175 | setSorting( true ); | 174 | setSorting( true ); |
@@ -180,2 +179,4 @@ void AbTable::setContacts( const OContactAccess::List& viewList ) | |||
180 | 179 | ||
180 | setPaintingEnabled( TRUE ); | ||
181 | |||
181 | } | 182 | } |
@@ -190,2 +191,3 @@ bool AbTable::selectContact( int UID ) | |||
190 | 191 | ||
192 | setPaintingEnabled( FALSE ); | ||
191 | for ( int r = 0; r < rows; ++r ) { | 193 | for ( int r = 0; r < rows; ++r ) { |
@@ -206,2 +208,4 @@ bool AbTable::selectContact( int UID ) | |||
206 | 208 | ||
209 | setPaintingEnabled( TRUE ); | ||
210 | |||
207 | return true; | 211 | return true; |
@@ -211,3 +215,3 @@ void AbTable::insertIntoTable( const OContact& cnt, int row ) | |||
211 | { | 215 | { |
212 | // qWarning( "void AbTable::insertIntoTable( const OContact& cnt, %d )", row ); | 216 | qWarning( "void AbTable::insertIntoTable( const OContact& cnt, %d )", row ); |
213 | QString strName, | 217 | QString strName, |
@@ -253,2 +257,3 @@ void AbTable::resort() | |||
253 | qWarning( "void AbTable::resort()" ); | 257 | qWarning( "void AbTable::resort()" ); |
258 | setPaintingEnabled( FALSE ); | ||
254 | if ( sorting() ) { | 259 | if ( sorting() ) { |
@@ -260,2 +265,3 @@ void AbTable::resort() | |||
260 | } | 265 | } |
266 | setPaintingEnabled( TRUE ); | ||
261 | } | 267 | } |
@@ -284,2 +290,4 @@ void AbTable::clear() | |||
284 | contactList.clear(); | 290 | contactList.clear(); |
291 | |||
292 | setPaintingEnabled( FALSE ); | ||
285 | for ( int r = 0; r < numRows(); ++r ) { | 293 | for ( int r = 0; r < numRows(); ++r ) { |
@@ -292,2 +300,3 @@ void AbTable::clear() | |||
292 | setNumRows( 0 ); | 300 | setNumRows( 0 ); |
301 | setPaintingEnabled( TRUE ); | ||
293 | } | 302 | } |
@@ -302,2 +311,3 @@ void AbTable::refresh() | |||
302 | 311 | ||
312 | setPaintingEnabled( FALSE ); | ||
303 | for ( int r = 0; r < rows; ++r ) { | 313 | for ( int r = 0; r < rows; ++r ) { |
@@ -308,2 +318,3 @@ void AbTable::refresh() | |||
308 | resort(); | 318 | resort(); |
319 | setPaintingEnabled( TRUE ); | ||
309 | } | 320 | } |
@@ -456,2 +467,4 @@ void AbTable::fitColumns() | |||
456 | // contentsWidth = 130; | 467 | // contentsWidth = 130; |
468 | |||
469 | setPaintingEnabled( FALSE ); | ||
457 | 470 | ||
@@ -468,2 +481,4 @@ void AbTable::fitColumns() | |||
468 | setColumnWidth( 1, contentsWidth ); | 481 | setColumnWidth( 1, contentsWidth ); |
482 | |||
483 | setPaintingEnabled( TRUE ); | ||
469 | } | 484 | } |
@@ -535,2 +550,4 @@ void AbTable::updateVisible() | |||
535 | { | 550 | { |
551 | qWarning("void AbTable::updateVisible()"); | ||
552 | |||
536 | int visible, | 553 | int visible, |
@@ -542,6 +559,6 @@ void AbTable::updateVisible() | |||
542 | 559 | ||
543 | realignTable(); | ||
544 | |||
545 | setPaintingEnabled( FALSE ); | 560 | setPaintingEnabled( FALSE ); |
546 | 561 | ||
562 | realignTable(); | ||
563 | |||
547 | totalRows = numRows(); | 564 | totalRows = numRows(); |
@@ -571,4 +588,9 @@ void AbTable::setPaintingEnabled( bool e ) | |||
571 | { | 588 | { |
572 | if ( e != enablePainting ) { | 589 | qWarning("IN void AbTable::setPaintingEnabled( %d )->Nested: %d", e, countNested ); |
573 | if ( !enablePainting ) { | 590 | |
591 | if ( e ) { | ||
592 | if ( countNested > 0 ) | ||
593 | --countNested; | ||
594 | if ( ! countNested ){ | ||
595 | setUpdatesEnabled( true ); | ||
574 | enablePainting = true; | 596 | enablePainting = true; |
@@ -576,8 +598,19 @@ void AbTable::setPaintingEnabled( bool e ) | |||
576 | viewport()->update(); | 598 | viewport()->update(); |
577 | } else { | ||
578 | enablePainting = false; | ||
579 | } | 599 | } |
600 | } else { | ||
601 | ++countNested; | ||
602 | enablePainting = false; | ||
603 | setUpdatesEnabled( false ); | ||
580 | } | 604 | } |
605 | qWarning("OUT void AbTable::setPaintingEnabled( %d )->Nested: %d", e, countNested ); | ||
581 | } | 606 | } |
582 | 607 | ||
608 | void AbTable::viewportPaintEvent( QPaintEvent* e ) { | ||
609 | qWarning(" void AbTable::viewportPaintEvent( QPaintEvent* e ) -> %d", enablePainting); | ||
610 | if ( enablePainting ) | ||
611 | QTable::viewportPaintEvent( e ); | ||
612 | } | ||
613 | |||
614 | |||
615 | |||
583 | void AbTable::rowHeightChanged( int row ) | 616 | void AbTable::rowHeightChanged( int row ) |