Skip to content

Commit

Permalink
Merge pull request #27 from afichet/v0.4.1
Browse files Browse the repository at this point in the history
Bugfix: wrong size
  • Loading branch information
afichet authored Jun 29, 2021
2 parents ac63de1 + 6416141 commit 6f54536
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5)

project(openexr-viewer
VERSION 0.4
VERSION 0.4.1
DESCRIPTION "Simple Viewer for OpenEXR files with detailed metadata display"
HOMEPAGE_URL "https://github.com/afichet/openexr-viewer"
LANGUAGES CXX
Expand Down
2 changes: 1 addition & 1 deletion deploy/linux/openexr-viewer.desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Desktop Entry]
Type=Application
Version=0.4
Version=0.4.1
Name=OpenEXR Viewer
Comment=Viewer for OpenEXR images
Icon=openexr-viewer
Expand Down
1 change: 1 addition & 0 deletions deploy/linux/openexr-viewer.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</description>
<launchable type="desktop-id">openexr-viewer.desktop</launchable>
<releases>
<release date="2021-06-29" version="0.4.1"/>
<release date="2021-05-30" version="0.4"/>
<release date="2021-05-22" version="0.3"/>
</releases>
Expand Down
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 6f54536

Please sign in to comment.