Skip to content

Commit

Permalink
Wrong CALLOUT placement when it is inside a MULTI_STEP page #168
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorsandy committed Dec 17, 2018
1 parent 0706592 commit beca4a3
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 38 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -143,9 +143,9 @@ LEGO® is a trademark of the LEGO Group of companies which does not sponsor, aut
[univention-icon]: https://raw.githubusercontent.com/trevorsandy/lpub3d/master/builds/utilities/icons/univention.png
[windows-icon]: https://raw.githubusercontent.com/trevorsandy/lpub3d/master/builds/utilities/icons/windows.png

[windows-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.5/LPub3D-2.3.5.1.1087_20181217.exe
[macos-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.5/LPub3D-2.3.5.1.1087_20181217-macos.dmg
[appimage-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.5/LPub3D-2.3.5.1.1087_20181217-x86_64.AppImage
[windows-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.5/LPub3D-2.3.5.1.1088_20181217.exe
[macos-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.5/LPub3D-2.3.5.1.1088_20181217-macos.dmg
[appimage-url]: https://github.com/trevorsandy/lpub3d/releases/download/v2.3.5/LPub3D-2.3.5.1.1088_20181217-x86_64.AppImage

[arch-url]: https://download.opensuse.org/repositories/home:/trevorsandy/Arch_Extra/
[centos-url]: https://download.opensuse.org/repositories/home:/trevorsandy/CentOS_7/
Expand Down
2 changes: 1 addition & 1 deletion builds/linux/obs/alldeps/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Trevor SANDY <trevor[dot]sandy[at]gmail[dot]com>
# Last Update: December 10, 2018
pkgname=lpub3d
pkgver=2.3.5.1087
pkgver=2.3.5.1088
pkgrel=1
pkgdesc="An LDraw Building Instruction Editor"
url="https://github.com/trevorsandy/lpub3d.git"
Expand Down
6 changes: 3 additions & 3 deletions builds/linux/obs/alldeps/debian/changelog
@@ -1,5 +1,5 @@
lpub3d (2.3.5.1087) debian; urgency=medium
lpub3d (2.3.5.1088) debian; urgency=medium

* LPub3D version 2.3.5.1.1087_20181217 for Linux
* LPub3D version 2.3.5.1.1088_20181217 for Linux

-- Trevor SANDY <trevor.sandy@gmail.com> Mon, 17 Dec 2018 02:01:13 +0100
-- Trevor SANDY <trevor.sandy@gmail.com> Mon, 17 Dec 2018 02:04:29 +0100
2 changes: 1 addition & 1 deletion builds/linux/obs/alldeps/debian/lpub3d.dsc
Expand Up @@ -2,7 +2,7 @@ Format: 1.0
Source: lpub3d
Binary: lpub3d
Architecture: any
Version: 2.3.5.1087
Version: 2.3.5.1088
Maintainer: Trevor SANDY <trevor.sandy@gmail.com>
Homepage: https://trevorsandy.github.io/lpub3d/
Standards-Version: 3.9.7
Expand Down
4 changes: 2 additions & 2 deletions builds/linux/obs/alldeps/lpub3d.spec
Expand Up @@ -117,7 +117,7 @@ BuildRequires: fdupes
Summary: An LDraw Building Instruction Editor
Name: lpub3d
Icon: lpub3d.xpm
Version: 2.3.5.1087
Version: 2.3.5.1088
Release: <B_CNT>%{?dist}
URL: https://trevorsandy.github.io/lpub3d
Vendor: Trevor SANDY
Expand Down Expand Up @@ -713,5 +713,5 @@ update-mime-database /usr/share/mime >/dev/null || true
update-desktop-database || true
%endif

* Mon Dec 17 2018 - trevor.dot.sandy.at.gmail.dot.com 2.3.5.1087
* Mon Dec 17 2018 - trevor.dot.sandy.at.gmail.dot.com 2.3.5.1088
- LPub3D Linux package (rpm) release
Binary file modified builds/utilities/ci/secure/.secrets.tar.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion builds/utilities/version.info
@@ -1 +1 @@
2 3 5 1 1087 7b94d94
2 3 5 1 1088 07065929
2 changes: 1 addition & 1 deletion mainApp/docs/README.txt
@@ -1,4 +1,4 @@
LPub3D 2.3.5.1.1087 (17 12 2018 02:01:13)
LPub3D 2.3.5.1.1088 (17 12 2018 02:04:29)

Features, enhancements, fixes and changes
------------
Expand Down
5 changes: 3 additions & 2 deletions mainApp/docs/RELEASE_NOTES.html
Expand Up @@ -9,7 +9,7 @@
<table class="tg">
<tr>
<th class="tg-0pky">
<h4><a id="LPub3D_0"></a>LPub3D 2.3.5.1.1087 (17 12 2018 02:01:13)</h4>
<h4><a id="LPub3D_0"></a>LPub3D 2.3.5.1.1088 (17 12 2018 02:04:29)</h4>
<hr>
<p>
LPub3D version 2.3.5 is a small update to correct recently reported issues.<br>
Expand All @@ -20,7 +20,8 @@ <h4><a id="Features_enhancements_fixes_and_changes_7"></a>Features, enhancements
</th>
</tr>
<tr><td class="tg-0lax"><a href="https://github.com/trevorsandy/lpub3d/issues/57">Enhancement - Refactor automatic macOS library checks #57</a></td></tr>
<tr><td class="tg-buh4"><a href="https://github.com/trevorsandy/lpub3d/issues/167">Fix - Wrong label for changing assembly margins from context menu #167</a></td></tr>
<tr><td class="tg-buh4"><a href="https://github.com/trevorsandy/lpub3d/issues/168">Fix - Wrong CALLOUT placement when it is inside a MULTI_STEP page #168</a></td></tr>
<tr><td class="tg-0lax"><a href="https://github.com/trevorsandy/lpub3d/issues/167">Fix - Wrong label for changing assembly margins from context menu #167</a></td></tr>
<tr>
<th class="tg-0pky">
<h4><a id="LPub3D_0"></a>LPub3D 2.3.3.0.1024 (27 10 2018 06:52:44) Release Notes</h4>
Expand Down
10 changes: 3 additions & 7 deletions mainApp/formatpage.cpp
Expand Up @@ -577,15 +577,11 @@ int Gui::addGraphicsPageItems(
step->stepNumber.sizeit();
}

/* Size the callouts */
for (int i = 0; i < step->list.size(); i++) {
step->list[i]->sizeIt();
}
// size the callouts

/* Size the callouts */
for (int i = 0; i < step->list.size(); i++) {
step->list[i]->sizeIt();
}
}

// add the assembly image to the scene

Expand Down Expand Up @@ -855,7 +851,7 @@ int Gui::addGraphicsPageItems(
plPage.placeRelative(page); // place multi-step relative to the page

page->relativeToSg(page); // compute bounding box of step group and callouts
// placed relative to it.
// placed relative to it.

plPage.placeRelativeBounding(page); // center multi-step in page's bounding box

Expand Down
2 changes: 1 addition & 1 deletion mainApp/org.trevorsandy.lpub3d.appdata.xml
Expand Up @@ -68,7 +68,7 @@
<binary>lpub3d23</binary>
​</provides>
<releases>
<release version="2.3.5.1087" date="2018-12-17">
<release version="2.3.5.1088" date="2018-12-17">
<description>
<p>LPub3D Linux AppImage package</p>
</description>
Expand Down
32 changes: 16 additions & 16 deletions mainApp/step.cpp
Expand Up @@ -775,14 +775,14 @@ const int rotateIconPlace[NumPlacements][2] =

const int coPlace[NumPlacements][2] =
{
{ TblCo3, TblCo3 }, // Top_Left
{ TblCsi, TblCo3 }, // Top
{ TblCo4, TblCo3 }, // Top_Right
{ TblCo4, TblCsi }, // Right
{ TblCo4, TblCo4 }, // BOTTOM_RIGHT
{ TblCsi, TblCo4 }, // BOTTOM
{ TblCo3, TblCo4 }, // BOTTOM_LEFT
{ TblCo3, TblCsi }, // LEFT
{ TblCo4, TblCo4 }, // Top_Left
{ TblCsi, TblCo4 }, // Top
{ TblCo5, TblCo4 }, // Top_Right
{ TblCo5, TblCsi }, // Right
{ TblCo5, TblCo5 }, // BOTTOM_RIGHT
{ TblCsi, TblCo5 }, // BOTTOM
{ TblCo4, TblCo5 }, // BOTTOM_LEFT
{ TblCo4, TblCsi }, // LEFT
{ TblCsi, TblCsi },
};

Expand Down Expand Up @@ -844,12 +844,12 @@ int marginCols[][2])
*/

int Step::sizeit(
int rows[], // accumulate sub-row heights here
int cols[], // accumulate sub-col widths here
int marginRows[][2],// accumulate sub-row margin heights here
int marginCols[][2],
int x,
int y)// accumulate sub-col margin widths here
int rows[], // accumulate sub-row heights here
int cols[], // accumulate sub-col widths here
int marginRows[][2],// accumulate sub-row margin heights here
int marginCols[][2],
int x,
int y)// accumulate sub-col margin widths here
{

// size up each callout
Expand Down Expand Up @@ -1062,7 +1062,7 @@ int y)// accumulate sub-col margin widths here
maxMargin(csiPlacement.margin,csiPlacement.tbl,marginRows,marginCols);
maxMargin(rotateIcon.margin,rotateIcon.tbl,marginRows,marginCols);

/* now place the callouts relative to the known (CSI, PLI, SM, SN, RI) */
/* now place the callouts relative to the known items (CSI, PLI, SM, SN, RI) */

int calloutSize[2] = { 0, 0 };
bool shared = false;
Expand Down Expand Up @@ -1330,7 +1330,7 @@ int y)// accumulate sub-col margin widths here
rows[subModel.tbl[YY]] = subModel.size[YY];
}
}
}
} // this is disabled

if (cols[stepNumber.tbl[XX]] < stepNumber.size[XX]) {
cols[stepNumber.tbl[XX]] = stepNumber.size[XX];
Expand Down

0 comments on commit beca4a3

Please sign in to comment.