[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Fri Apr 2 00:12:47 CEST 2004


CVS commit by arwalker: 

Minor UI enhancements


  M +17 -7     kstdebugdialog_i.cpp   1.4


--- kdeextragear-2/kst/kst/kstdebugdialog_i.cpp  #1.3:1.4
@@ -125,4 +125,6 @@ void KstDebugDialogI::show_I() {   
   
   QDialog::show();
+  
+  logAdded();
 }
 
@@ -131,12 +133,15 @@ void KstDebugDialogI::logAdded() {
   int iNumRows;
   
+  if( isVisible() ) {
   iNumRows = KstDebug::self()->messages()->count();
   _table->setNumRows( iNumRows );
+    _table->ensureCellVisible( iNumRows-1, 0 );
+  }
 
   if( _bFirstNotification ) {
     rect = _table->horizontalHeader()->rect();
-    _table->setColumnWidth( 0, 1*rect.width()/10 );
-    _table->setColumnWidth( 1, 2*rect.width()/10 );
-    _table->setColumnWidth( 2, 7*rect.width()/10 );
+    _table->setColumnWidth( 0,  3*rect.width()/20 );
+    _table->setColumnWidth( 1,  5*rect.width()/20 );
+    _table->setColumnWidth( 2, 12*rect.width()/20 );
     
     _bFirstNotification = false;
@@ -152,4 +157,7 @@ void KstDebugDialogI::hideMessages(KstDe
   if( pMessages ) {
     iNumRows  = pMessages->count();
+    
+    _table->setUpdatesEnabled( FALSE );
+    
     for( i=0; i<iNumRows; i++ ) {
       if( (*pMessages)[i].level == level ) {
@@ -161,4 +169,6 @@ void KstDebugDialogI::hideMessages(KstDe
       }
     }
+    
+    _table->setUpdatesEnabled( TRUE );
   }
 }





More information about the Kst mailing list