Commit 4ea80e90a85a503880d7c0257b3942a3612c0fc8
1 parent
c271ed46
Exists in
master
and in
1 other branch
fixing "print copy" action.
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
src/dialogs/print/draw.c
| @@ -99,23 +99,22 @@ | @@ -99,23 +99,22 @@ | ||
| 99 | 99 | ||
| 100 | for(drawing = 0; drawing < operation->lpp; drawing++) | 100 | for(drawing = 0; drawing < operation->lpp; drawing++) |
| 101 | { | 101 | { |
| 102 | - size_t pos = (row * selection->bounds.width); | ||
| 103 | - debug("Drawing: %u row=%u selection=%p pos=%u", (unsigned int) drawing, row, selection, (unsigned int) pos); | ||
| 104 | - | ||
| 105 | - if(((unsigned int) ++row) > selection->bounds.height) | 102 | + if(((unsigned int) row) >= selection->bounds.height) |
| 106 | { | 103 | { |
| 107 | debug("Searching for next block (first line=%u)",(unsigned int) (page * operation->lpp) + drawing); | 104 | debug("Searching for next block (first line=%u)",(unsigned int) (page * operation->lpp) + drawing); |
| 108 | row = get_row(operation,(page * operation->lpp) + drawing, &selection); | 105 | row = get_row(operation,(page * operation->lpp) + drawing, &selection); |
| 109 | if(row < 0) | 106 | if(row < 0) |
| 110 | - { | ||
| 111 | break; | 107 | break; |
| 112 | - } | 108 | + |
| 113 | } | 109 | } |
| 114 | 110 | ||
| 115 | // Draw columns | 111 | // Draw columns |
| 112 | + size_t pos = (row * selection->bounds.width); | ||
| 116 | size_t col; | 113 | size_t col; |
| 117 | rect.x = operation->font.info.left; | 114 | rect.x = operation->font.info.left; |
| 118 | 115 | ||
| 116 | + debug("Drawing: %u row=%u selection=%p pos=%u", (unsigned int) drawing, row, selection, (unsigned int) pos); | ||
| 117 | + | ||
| 119 | for(col = 0; col < selection->bounds.width;col++) | 118 | for(col = 0; col < selection->bounds.width;col++) |
| 120 | { | 119 | { |
| 121 | if(selection->contents[pos].chr) | 120 | if(selection->contents[pos].chr) |
| @@ -146,6 +145,7 @@ | @@ -146,6 +145,7 @@ | ||
| 146 | 145 | ||
| 147 | // Advance to the next row | 146 | // Advance to the next row |
| 148 | rect.y += (rect.height-1); | 147 | rect.y += (rect.height-1); |
| 148 | + row++; | ||
| 149 | 149 | ||
| 150 | } | 150 | } |
| 151 | 151 |