OSDN Git Service

fix draw background after EOF hexview::drawLines
authorsuma <devnull@localhost>
Tue, 10 Feb 2009 16:05:27 +0000 (01:05 +0900)
committersuma <devnull@localhost>
Tue, 10 Feb 2009 16:05:27 +0000 (01:05 +0900)
src/control/standard/hexview.cpp

index eb9750d..7d1bd90 100644 (file)
@@ -172,8 +172,7 @@ void HexView::refreshPixmap(int type, int line, int end)
        // Draw empty area(after end line)
        if (type == DRAW_ALL || type == DRAW_AFTER) {
                QBrush brush(config.Colors[Color::Background]);
-               QRect rect(0, y_top, width(), height());
-               painter.fillRect(rect, brush);
+               painter.fillRect(0, y_top + config.byteHeight(), width(), height(), brush);
        }
 
        // Copy from document
@@ -274,6 +273,12 @@ COUNTUP:// Count up
                        y += config.byteHeight();
                }
        }
+
+       // Draw empty area(after end line)
+       if (x <= HexConfig::Num) {
+               QBrush brush(config.Colors[Color::Background]);
+               painter.fillRect(config.x(x), y, width(), config.byteHeight(), brush);
+       }
 }
 
 inline void HexView::drawText(QPainter &painter, const QString &hex, int x, int y)