Skip to content

Commit

Permalink
Blender LDraw Render - settings changed for line edits #416
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorsandy committed May 12, 2023
1 parent 41a2ad8 commit 0c1fb7f
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 33 deletions.
2 changes: 1 addition & 1 deletion builds/linux/obs/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 - 2023 by Trevor SANDY
pkgname=lpub3d
pkgver=2.4.6.3376
pkgver=2.4.6.3377
pkgrel=1
pkgdesc="An LDraw Building Instruction Editor"
url="https://github.com/trevorsandy/lpub3d.git"
Expand Down
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 - 2023 by Trevor SANDY
pkgname=lpub3d
pkgver=2.4.6.3376
pkgver=2.4.6.3377
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.6.3376) debian; urgency=medium
lpub3d (2.4.6.3377) debian; urgency=medium

* LPub3D version 2.4.6.265.3376_20230512 for Linux
* LPub3D version 2.4.6.266.3377_20230512 for Linux

-- Trevor SANDY <trevor.sandy@gmail.com> Fri, 12 May 2023 06:03:35 +0200
-- Trevor SANDY <trevor.sandy@gmail.com> Fri, 12 May 2023 06:04:03 +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.6.3376
Version: 2.4.6.3377
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
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ BuildRequires: fdupes
Summary: An LDraw Building Instruction Editor
Name: lpub3d
Icon: lpub3d.xpm
Version: 2.4.6.3376
Version: 2.4.6.3377
Release: <B_CNT>%{?dist}
URL: https://trevorsandy.github.io/lpub3d
Vendor: Trevor SANDY
Expand Down Expand Up @@ -797,7 +797,7 @@ update-desktop-database || true
%endif

%changelog
* Fri May 12 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3376
* Fri May 12 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3377
- LPub3D 2.4.4 enhancements and fixes - see RELEASE_NOTES for details

* Tue May 31 2022 - trevor dot sandy at gmail dot com 2.4.4.2670
Expand Down
6 changes: 3 additions & 3 deletions builds/linux/obs/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lpub3d (2.4.6.3376) debian; urgency=medium
lpub3d (2.4.6.3377) debian; urgency=medium

* LPub3D version 2.4.6.265.3376_20230512 for Linux
* LPub3D version 2.4.6.266.3377_20230512 for Linux

-- Trevor SANDY <trevor.sandy@gmail.com> Fri, 12 May 2023 06:03:37 +0200
-- Trevor SANDY <trevor.sandy@gmail.com> Fri, 12 May 2023 06:04:04 +0200
2 changes: 1 addition & 1 deletion builds/linux/obs/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.6.3376
Version: 2.4.6.3377
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/lpub3d.spec
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ BuildRequires: fdupes
Summary: An LDraw Building Instruction Editor
Name: lpub3d
Icon: lpub3d.xpm
Version: 2.4.6.3376
Version: 2.4.6.3377
Release: 1%{?dist}
URL: https://trevorsandy.github.io/lpub3d
Vendor: Trevor SANDY
Expand Down Expand Up @@ -313,7 +313,7 @@ update-desktop-database || true
%endif

%changelog
* Fri May 12 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3376
* Fri May 12 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3377
- LPub3D 2.4.4 enhancements and fixes - see RELEASE_NOTES for details

* Tue May 31 2022 - trevor dot sandy at gmail dot com 2.4.4.2670
Expand Down
2 changes: 1 addition & 1 deletion builds/utilities/version.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2 4 6 265 3376 7f518f733
2 4 6 266 3377 41a2ad88f
6 changes: 3 additions & 3 deletions gitversion.pri
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ equals(GIT_DIR, undefined) {

# Check if we do not have a valid version number (i.e. no version tag found)
isEmpty(GIT_VERSION) {
GIT_REVISION = 265
GIT_REVISION = 266
GIT_SHA = $$system($$GIT_BASE_COMMAND rev-parse --short HEAD 2> $$NULL_DEVICE)
GIT_COMMIT = $$system($$GIT_BASE_COMMAND rev-list --count HEAD 2> $$NULL_DEVICE)
GIT_VERSION = v$${VERSION}-$${GIT_REVISION}-$${GIT_SHA}
Expand Down Expand Up @@ -69,7 +69,7 @@ equals(GIT_DIR, undefined) {
# Get commit count
GIT_COMMIT = $$system($$GIT_BASE_COMMAND rev-list --count HEAD 2> $$NULL_DEVICE)
isEmpty(GIT_COMMIT) {
GIT_COMMIT = 3376
GIT_COMMIT = 3377
message("~~~ ERROR! GIT_COMMIT NOT DEFINED, USING $$GIT_COMMIT ~~~")
}

Expand Down Expand Up @@ -117,7 +117,7 @@ if (equals(USE_GIT_VER_FILE, true)|equals(USE_VERSION_INFO_VAR, true)) {
GIT_VERSION = $$cat($$GIT_VER_FILE, lines)
} else {
message("~~~ ERROR! $$GIT_DIR_ENV VERSION_INFO FILE $$GIT_VER_FILE NOT FOUND ~~~")
GIT_VERSION = $${VERSION}.265.3376.7f518f733
GIT_VERSION = $${VERSION}.266.3377.41a2ad88f
message("~~~ GIT_DIR [$$GIT_DIR_ENV, USING VERSION] $$GIT_VERSION ~~~")
GIT_VERSION ~= s/\./" "
}
Expand Down
34 changes: 23 additions & 11 deletions mainApp/blenderpreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,8 @@ void BlenderPreferences::initPathsAndSettings()
lineEdit->setValidator(new QIntValidator(1,1000));
else
lineEdit->setValidator(new QDoubleValidator(0.01,100.0,2));
connect(lineEdit, SIGNAL(editingFinished()),
this, SLOT (settingChanged()));
connect(lineEdit, SIGNAL(textEdited( const QString &)),
this, SLOT (settingChanged(const QString &)));
}
lineEdit->setToolTip(mBlenderSettings[i].tooltip);
mLineEditList << lineEdit;
Expand Down Expand Up @@ -813,8 +813,8 @@ void BlenderPreferences::initPathsAndSettingsMM()
lineEdit->setValidator(new QDoubleValidator(0.001,100.0,3));
else
lineEdit->setValidator(new QIntValidator(1, RENDER_IMAGE_MAX_SIZE));
connect(lineEdit, SIGNAL(editingFinished()),
this, SLOT (settingChanged()));
connect(lineEdit, SIGNAL(textEdited( const QString &)),
this, SLOT (settingChanged(const QString &)));
}
lineEdit->setToolTip(mBlenderSettingsMM[i].tooltip);
mLineEditList << lineEdit;
Expand Down Expand Up @@ -1283,11 +1283,29 @@ bool BlenderPreferences::extractBlenderAddon(const QString &blenderDir)
return proceed;
}

void BlenderPreferences::settingChanged(const QString &value)
{
bool change = false;

QLineEdit *lineEdit = qobject_cast<QLineEdit *>(sender());
if (lineEdit) {
int i = lineEdit->property("ControlID").toInt();
if (mImportMMActBox->isChecked()) {
change = mBlenderSettingsMM[i].value != value;
} else {
change = mBlenderSettings[i].value != value;
}
}

change |= settingsModified(false/*update*/);
emit settingChangedSig(change);
}

void BlenderPreferences::settingChanged(int index)
{
int i = -1;
bool change = false;
QString item, value;
QString item;

if (index > -1) {
QComboBox *comboBox = qobject_cast<QComboBox *>(sender());
Expand All @@ -1300,12 +1318,6 @@ void BlenderPreferences::settingChanged(int index)
if (checkBox) {
i = checkBox->property("ControlID").toInt();
item = QString::number(checkBox->isChecked());
} else {
QLineEdit *lineEdit = qobject_cast<QLineEdit *>(sender());
if (lineEdit) {
i = lineEdit->property("ControlID").toInt();
item = lineEdit->text();
}
}
}

Expand Down
1 change: 1 addition & 0 deletions mainApp/blenderpreferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ private slots:
void setModelSize(bool = false);
void validateColourScheme(int);
void settingChanged(int = -1);
void settingChanged(const QString &value);
void pathChanged();
bool promptAccept();
void update();
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.6.265.3376 (12 05 2023 06:03:37)
LPub3D 2.4.6.266.3377 (12 05 2023 06:04:04)

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 @@ -18,7 +18,7 @@
<table class="tg">
<tr>
<th class="tg-0pky">
<h4><a id="LPub3D_0"></a>LPub3D 2.4.6.265.3376 (12 05 2023 06:03:37)</h4>
<h4><a id="LPub3D_0"></a>LPub3D 2.4.6.266.3377 (12 05 2023 06:04:04)</h4>
<hr>
<p>
<span class="tg-1pky">LPub3D Official release.</span><br>
Expand Down
4 changes: 2 additions & 2 deletions mainApp/extras/LPub3D_Npp_UDL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
;;
;; Author......: Trevor SANDY
;; Name........: LPub3D_Npp_UDL.xml
;; Version.....: 2.4.6.265.3376
;; Last Update.: Fri, 12 May 2023 06:03:37 +0200
;; Version.....: 2.4.6.266.3377
;; Last Update.: Fri, 12 May 2023 06:04:04 +0200
;; License.....: GPLv3
;; Homepage....: https://trevorsandy.github.io/lpub3d
;; Copyright (C) 2021 - 2023 by Trevor SANDY
Expand Down

0 comments on commit 0c1fb7f

Please sign in to comment.