Skip to content

Commit

Permalink
Bugfix: wrong attribute used for width / height
Browse files Browse the repository at this point in the history
  • Loading branch information
afichet committed Jun 29, 2021
1 parent ac63de1 commit 94fc88a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/model/HeaderModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,12 @@ HeaderItem *HeaderModel::addItem(
part_number,
name);


const int width = attr.value().max.x - attr.value().min.x + 1;
const int height = attr.value().max.y - attr.value().min.y + 1;

std::stringstream sWidth;
sWidth << attr.value().size().x;
sWidth << width;

new HeaderItem(
attrItem,
Expand All @@ -328,7 +332,7 @@ HeaderItem *HeaderModel::addItem(
name);

std::stringstream sHeight;
sHeight << attr.value().size().y;
sHeight << height;

new HeaderItem(
attrItem,
Expand Down Expand Up @@ -376,8 +380,11 @@ HeaderItem *HeaderModel::addItem(
part_number,
name);

const float width = attr.value().max.x - attr.value().min.x + 1;
const float height = attr.value().max.y - attr.value().min.y + 1;

std::stringstream sWidth;
sWidth << attr.value().size().x;
sWidth << width;

new HeaderItem(
attrItem,
Expand All @@ -387,7 +394,7 @@ HeaderItem *HeaderModel::addItem(
name);

std::stringstream sHeight;
sHeight << attr.value().size().y;
sHeight << height;

new HeaderItem(
attrItem,
Expand Down

0 comments on commit 94fc88a

Please sign in to comment.