libredwg icon indicating copy to clipboard operation
libredwg copied to clipboard

Cannot read block headers' entities after changing their order

Open erfansn opened this issue 7 months ago • 1 comments

I realized that when changing the drawing order of entities, I cannot read them properly, and some are missed. If this isn't a bug, how should I read them in order?

auto currentEntityObject = get_first_owned_entity(blockHeaderObject);
while (currentEntityObject != nullptr) {
  ...
  currentEntityObject = get_next_owned_entity(blockHeaderObject, currentEntityObject);
}

Version: R2000

draw_line_circle_reordered_circle_line.dwg.zip

erfansn avatar Apr 09 '25 07:04 erfansn

I reverted this line of code, and it worked perfectly afterward.

The question is: Why did this change occur?

https://github.com/LibreDWG/libredwg/commit/0aa0b3969c9872544e5896d3bc5359541e8a725b#diff-1fd2f6ebd47b197086172a5e9539e82b31bb5abae82b670ba881a9cc04809befL932

erfansn avatar Apr 14 '25 12:04 erfansn