[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdevelop/parts/qeditor
From:       Roberto Raggi <raggi () cli ! di ! unipi ! it>
Date:       2002-12-18 14:13:41
[Download RAW message or body]

CVS commit by raggi: 

improved QEditor::refresh()


  M +11 -21    qeditor.cpp   1.31
  M +2 -2      qeditor_view.cpp   1.26


--- kdevelop/parts/qeditor/qeditor.cpp  #1.30:1.31
@@ -153,6 +153,6 @@ QEditor::QEditor( QWidget* parent, const
     connect( this, SIGNAL(cursorPositionChanged(QTextCursor*) ),
              this, SLOT(doMatch(QTextCursor*)) );
-    connect( this, SIGNAL(cursorPositionChanged(int, int) ),
-             this, SLOT(slotCursorPositionChanged(int, int)) );
+//    connect( this, SIGNAL(cursorPositionChanged(int, int) ),
+//           this, SLOT(slotCursorPositionChanged(int, int)) );
 }
 
@@ -458,16 +458,8 @@ void QEditor::setText( const QString& te
 }
 
-void QEditor::slotCursorPositionChanged( int /*line*/, int )
+void QEditor::slotCursorPositionChanged( int line, int column )
 {
-#if 0
-    if( line != m_currentLine ){
-        if( m_currentLine != -1 ){
-            clearParagraphBackground( m_currentLine );
-        }
-        m_currentLine = line;
-        setParagraphraphBackgroundColor( m_currentLine,
-                                     palette().active().mid() );
-    }
-#endif
+    Q_UNUSED( line );
+    Q_UNUSED( column );
 }
 
@@ -511,16 +503,14 @@ void QEditor::setBackgroundParser( Backg
 void QEditor::refresh()
 {
+    document()->invalidate();
     QTextParagraph* p = document()->firstParagraph();
     while( p ){
-        if( p->endState() == -1 ){
-            break;
-        }
-        p->setEndState( -1 );
-        p->invalidate( 0 );
+        p->format();
         p = p->next();
     }
-    sync();
-    viewport()->repaint( true );
+    removeSelection( ParenMatcher::Match );
+    removeSelection( ParenMatcher::Mismatch );
     ensureCursorVisible();
+    repaintContents( false );
 }
 

--- kdevelop/parts/qeditor/qeditor_view.cpp  #1.25:1.26
@@ -522,5 +522,5 @@ void QEditorView::internalCollapseBlock(
             }
             
-            kdDebug(9032) << "hide parag " << p->paragId() << " level = " << data->level() << endl;
+            // kdDebug(9032) << "hide parag " << p->paragId() << " level = " << data->level() << endl;
             p->hide();
             


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic