Skip to content

Commit

Permalink
gui2/canvas: Fix zero-width rectangles being painted 1 px-wide
Browse files Browse the repository at this point in the history
This fixes the selection highlight for textboxes glitching into view as
a 1 px-wide highlight on the left end when there isn't an active
selection.
  • Loading branch information
irydacea committed Oct 4, 2016
1 parent 5e00500 commit 7fa7037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/core/canvas.cpp
Expand Up @@ -738,7 +738,7 @@ void trectangle::draw(surface& canvas,
}

// Fill the background, if applicable
if(fill_color_) {
if(fill_color_ && w && h) {
set_renderer_color(renderer, fill_color_);

SDL_Rect area {
Expand Down

0 comments on commit 7fa7037

Please sign in to comment.