X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbufferable.cpp;h=d07f57cc4e430f5d337c67cd7ebd47917eb3a456;hb=26502dca8d631c7c4b1fcc6dbe334da941f4ab54;hp=fc0e3d21a203972b29e65165a5d09dd33241ba09;hpb=ffe1debbd757d20f7250fd8572c2c46cd901f559;p=libs%2Fgl.git diff --git a/source/bufferable.cpp b/source/bufferable.cpp index fc0e3d21..d07f57cc 100644 --- a/source/bufferable.cpp +++ b/source/bufferable.cpp @@ -48,15 +48,17 @@ void Bufferable::use_buffer(Buffer *buf, Bufferable *prev) update_offset(); } -void Bufferable::buffer_resized() +void Bufferable::change_buffer(Buffer *buf) { for(Bufferable *b=this; b; b=b->next_in_buffer) { + b->buffer = buf; b->location_dirty = true; b->dirty = true; } for(Bufferable *b=prev_in_buffer; b; b=b->prev_in_buffer) { + b->buffer = buf; b->location_dirty = true; b->dirty = true; } @@ -86,6 +88,7 @@ void Bufferable::unlink_from_buffer() prev_in_buffer = 0; next_in_buffer = 0; buffer = 0; + offset = 0; } void Bufferable::update_offset()