Skip to content

Commit

Permalink
Build modification - clear and reload model on from project setup #411
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorsandy committed Oct 2, 2020
1 parent 2510bd1 commit fbdb61a
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 26 deletions.
2 changes: 1 addition & 1 deletion builds/linux/obs/alldeps/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Last Update: July 19, 2020
# Copyright (c) 2017 - 2020 by Trevor SANDY
pkgname=lpub3d
pkgver=2.4.0.1984
pkgver=2.4.0.1985
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lpub3d (2.4.0.1984) debian; urgency=medium
lpub3d (2.4.0.1985) debian; urgency=medium

* LPub3D version 2.4.0.1.1984_20201002 for Linux
* LPub3D version 2.4.0.1.1985_20201002 for Linux

-- Trevor SANDY <[email protected]> Fri, 02 Oct 2020 13:22:45 +0200
-- Trevor SANDY <[email protected]> Fri, 02 Oct 2020 13:23:27 +0200
2 changes: 1 addition & 1 deletion builds/linux/obs/alldeps/debian/lpub3d.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Format: 1.0
Source: lpub3d
Binary: lpub3d
Architecture: any
Version: 2.4.0.1984
Version: 2.4.0.1985
Maintainer: Trevor SANDY <[email protected]>
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
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ BuildRequires: fdupes
Summary: An LDraw Building Instruction Editor
Name: lpub3d
Icon: lpub3d.xpm
Version: 2.4.0.1984
Version: 2.4.0.1985
Release: <B_CNT>%{?dist}
URL: https://trevorsandy.github.io/lpub3d
Vendor: Trevor SANDY
Expand Down Expand Up @@ -728,5 +728,5 @@ update-mime-database /usr/share/mime >/dev/null || true
update-desktop-database || true
%endif

* Fri Oct 02 2020 - trevor.dot.sandy.at.gmail.dot.com 2.4.0.1984
* Fri Oct 02 2020 - trevor.dot.sandy.at.gmail.dot.com 2.4.0.1985
- 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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2 4 0 1 1984 178a29c
2 4 0 1 1985 2510bd1
9 changes: 7 additions & 2 deletions mainApp/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1027,16 +1027,21 @@ int Application::run()
return ExecReturn;
}

void clearCustomPartCache(bool silent)
void clearAndReloadModelFileFromSettings()
{
gui->clearCustomPartCache(silent);
gui->clearAndReloadModelFile(true);
}

void clearAndReloadModelFile()
{
gui->clearAndReloadModelFile();
}

void clearCustomPartCache(bool silent)
{
gui->clearCustomPartCache(silent);
}

void reloadCurrentPage(){
gui->reloadCurrentPage();
}
Expand Down
1 change: 1 addition & 0 deletions mainApp/application.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ public slots:
#endif

void clearCustomPartCache(bool silent = false);
void clearAndReloadModelFileFromSettings();
void clearAndReloadModelFile();
void reloadCurrentPage();
void restartApplication();
Expand Down
2 changes: 1 addition & 1 deletion mainApp/docs/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LPub3D 2.4.0.1.1984 (02 10 2020 13:22:45)
LPub3D 2.4.0.1.1985 (02 10 2020 13:23:27)

Features, enhancements, fixes and changes
------------
Expand Down
2 changes: 1 addition & 1 deletion mainApp/docs/RELEASE_NOTES.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<table class="tg">
<tr>
<th class="tg-0pky">
<h4><a id="LPub3D_0"></a>LPub3D 2.4.0.1.1984 (02 10 2020 13:22:45)</h4>
<h4><a id="LPub3D_0"></a>LPub3D 2.4.0.1.1985 (02 10 2020 13:23:27)</h4>
<hr>
<p>
LPub3D Continuous release.<br>
Expand Down
8 changes: 8 additions & 0 deletions mainApp/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,4 +362,12 @@ public slots:
void clearCache(bool);
void checkConflict(bool);
};

void clearPliCache();
void clearAndReloadModelFileFromSettings();
void clearCsiCache();
void clearSubmodelCache();
void clearPliCache();
void clearTempCache();

#endif
4 changes: 2 additions & 2 deletions mainApp/lpub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1531,8 +1531,8 @@ void Gui::clearAndRedrawModelFile() {
changeAccepted = saveChange;
}

void Gui::clearAndReloadModelFile() {
if (sender() == editWindow) {
void Gui::clearAndReloadModelFile(bool fromProjectSetup) {
if (sender() == editWindow || fromProjectSetup) {
bool _continue;
if (Preferences::saveOnRedraw) {
_continue = maybeSave(false); // No prompt
Expand Down
2 changes: 1 addition & 1 deletion mainApp/lpub.h
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ public slots:
void clearStepCSICache(QString &pngName);
void clearPageCSICache(PlacementType relativeType, Page *page);
void clearPageCSIGraphicsItems(Step *step);
void clearAndReloadModelFile();
void clearAndReloadModelFile(bool fromProjectSetup = false);
void clearAndRedrawModelFile();
void reloadCurrentModelFile();
void reloadModelFileAfterColorFileGen();
Expand Down
7 changes: 0 additions & 7 deletions mainApp/metagui.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@
#include "metatypes.h"
#include "gradients.h"

void clearPliCache();
void clearAndReloadModelFile();
void clearCsiCache();
void clearSubmodelCache();
void clearPliCache();
void clearTempCache();

class QWidget;
class QString;
class QHBoxLayout;
Expand Down
2 changes: 1 addition & 1 deletion mainApp/org.trevorsandy.lpub3d.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<binary>lpub3d24</binary>
​</provides>
<releases>
<release version="2.4.0.1984" date="2020-10-02">
<release version="2.4.0.1985" date="2020-10-02">
<description>
<p>LPub3D Linux AppImage package</p>
</description>
Expand Down
7 changes: 4 additions & 3 deletions mainApp/projectglobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ GlobalProjectDialog::GlobalProjectDialog(

box = new QGroupBox("Build Modifications");
layout->addWidget(box);
BuildModEnabledGui *childBuildModEnabledbersBox = new BuildModEnabledGui("Enable Build Modification functionality",&lpubMeta->buildModEnabled,box);
BuildModEnabledGui *childBuildModEnabled = new BuildModEnabledGui("Enable Build Modification functionality",&lpubMeta->buildModEnabled,box);
box->setToolTip("Use Build Modification meta syntax. This functionality replaces or accompanies the legacy BUFEXCHG functionality.");
data->children.append(childBuildModEnabledbersBox);
data->children.append(childBuildModEnabled);
connect (childBuildModEnabled->getCheckBox(), SIGNAL(clicked(bool)), this, SLOT(clearCache(bool)));

box = new QGroupBox("Consolidate Submodel Instances");
box->setCheckable(true);
Expand Down Expand Up @@ -159,7 +160,7 @@ void GlobalProjectDialog::accept()
mi.endMacro();

if (data->clearCache) {
clearAndReloadModelFile();
clearAndReloadModelFileFromSettings();
}

QDialog::accept();
Expand Down

0 comments on commit fbdb61a

Please sign in to comment.