| 168 | } |
| 169 | |
| 170 | void CodeEditor::updateLineNumberArea(const QRect& rect, int dy) |
| 171 | { |
| 172 | if(dy) |
| 173 | lineNumberArea->scroll(0, dy); |
| 174 | else |
| 175 | lineNumberArea->update(0, rect.y(), lineNumberArea->width(), rect.height()); |
| 176 | |
| 177 | if(rect.contains(viewport()->rect())) |
| 178 | updateLineNumberAreaWidth(0); |
| 179 | } |
| 180 | |
| 181 | void CodeEditor::keyPressEvent(QKeyEvent* e) |
| 182 | { |