Commit 4ea80e90a85a503880d7c0257b3942a3612c0fc8

Authored by Perry Werneck
1 parent c271ed46
Exists in master and in 1 other branch develop

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 99  
100 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 104 debug("Searching for next block (first line=%u)",(unsigned int) (page * operation->lpp) + drawing);
108 105 row = get_row(operation,(page * operation->lpp) + drawing, &selection);
109 106 if(row < 0)
110   - {
111 107 break;
112   - }
  108 +
113 109 }
114 110  
115 111 // Draw columns
  112 + size_t pos = (row * selection->bounds.width);
116 113 size_t col;
117 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 118 for(col = 0; col < selection->bounds.width;col++)
120 119 {
121 120 if(selection->contents[pos].chr)
... ... @@ -146,6 +145,7 @@
146 145  
147 146 // Advance to the next row
148 147 rect.y += (rect.height-1);
  148 + row++;
149 149  
150 150 }
151 151  
... ...