diff --git a/builds/linux/obs/alldeps/PKGBUILD b/builds/linux/obs/alldeps/PKGBUILD index 89a042ff4..3afa32090 100644 --- a/builds/linux/obs/alldeps/PKGBUILD +++ b/builds/linux/obs/alldeps/PKGBUILD @@ -2,7 +2,7 @@ # Last Update: July 19, 2020 # Copyright (c) 2017 - 2020 by Trevor SANDY pkgname=lpub3d -pkgver=2.4.1.2042 +pkgver=2.4.1.2043 pkgrel=1 pkgdesc="An LDraw Building Instruction Editor" url="https://github.com/trevorsandy/lpub3d.git" diff --git a/builds/linux/obs/alldeps/debian/changelog b/builds/linux/obs/alldeps/debian/changelog index 97da027f2..e0ede12fd 100644 --- a/builds/linux/obs/alldeps/debian/changelog +++ b/builds/linux/obs/alldeps/debian/changelog @@ -1,5 +1,5 @@ -lpub3d (2.4.1.2042) debian; urgency=medium +lpub3d (2.4.1.2043) debian; urgency=medium - * LPub3D version 2.4.1.1.2042_20210312 for Linux + * LPub3D version 2.4.1.1.2043_20210312 for Linux - -- Trevor SANDY Fri, 12 Mar 2021 06:37:05 +0100 + -- Trevor SANDY Fri, 12 Mar 2021 06:37:43 +0100 diff --git a/builds/linux/obs/alldeps/debian/lpub3d.dsc b/builds/linux/obs/alldeps/debian/lpub3d.dsc index 6d32c8cf9..3857fa11f 100644 --- a/builds/linux/obs/alldeps/debian/lpub3d.dsc +++ b/builds/linux/obs/alldeps/debian/lpub3d.dsc @@ -2,7 +2,7 @@ Format: 1.0 Source: lpub3d Binary: lpub3d Architecture: any -Version: 2.4.1.2042 +Version: 2.4.1.2043 Maintainer: Trevor SANDY Homepage: https://trevorsandy.github.io/lpub3d/ Standards-Version: 3.9.7 diff --git a/builds/linux/obs/alldeps/lpub3d.spec b/builds/linux/obs/alldeps/lpub3d.spec index d51f640f0..08f5e3385 100644 --- a/builds/linux/obs/alldeps/lpub3d.spec +++ b/builds/linux/obs/alldeps/lpub3d.spec @@ -116,7 +116,7 @@ BuildRequires: fdupes Summary: An LDraw Building Instruction Editor Name: lpub3d Icon: lpub3d.xpm -Version: 2.4.1.2042 +Version: 2.4.1.2043 Release: %{?dist} URL: https://trevorsandy.github.io/lpub3d Vendor: Trevor SANDY @@ -731,5 +731,5 @@ update-mime-database /usr/share/mime >/dev/null || true update-desktop-database || true %endif -* Fri Mar 12 2021 - trevor.dot.sandy.at.gmail.dot.com 2.4.1.2042 +* Fri Mar 12 2021 - trevor.dot.sandy.at.gmail.dot.com 2.4.1.2043 - LPub3D Linux package (rpm) release diff --git a/builds/utilities/ci/secure/.secrets.tar.enc b/builds/utilities/ci/secure/.secrets.tar.enc index 79cdde0ff..10da3813b 100644 Binary files a/builds/utilities/ci/secure/.secrets.tar.enc and b/builds/utilities/ci/secure/.secrets.tar.enc differ diff --git a/builds/utilities/version.info b/builds/utilities/version.info index d58289638..94e637f11 100755 --- a/builds/utilities/version.info +++ b/builds/utilities/version.info @@ -1 +1 @@ -2 4 1 1 2042 a8195ed +2 4 1 1 2043 2951b15 diff --git a/mainApp/docs/README.txt b/mainApp/docs/README.txt index 074508aa2..669027693 100755 --- a/mainApp/docs/README.txt +++ b/mainApp/docs/README.txt @@ -1,4 +1,4 @@ -LPub3D 2.4.1.1.2042 (12 03 2021 06:37:05) +LPub3D 2.4.1.1.2043 (12 03 2021 06:37:43) Features, enhancements, fixes and changes ------------ diff --git a/mainApp/docs/RELEASE_NOTES.html b/mainApp/docs/RELEASE_NOTES.html index cd81b426a..ad1a5acab 100644 --- a/mainApp/docs/RELEASE_NOTES.html +++ b/mainApp/docs/RELEASE_NOTES.html @@ -9,7 +9,7 @@
-

LPub3D 2.4.1.1.2042 (12 03 2021 06:37:05)

+

LPub3D 2.4.1.1.2043 (12 03 2021 06:37:43)


LPub3D Official release.
diff --git a/mainApp/editwindow.cpp b/mainApp/editwindow.cpp index 3ab91aaa7..187249626 100644 --- a/mainApp/editwindow.cpp +++ b/mainApp/editwindow.cpp @@ -1135,18 +1135,25 @@ void EditWindow::updateSelectedParts() { if(!cursor.hasSelection()) cursor.select(QTextCursor::LineUnderCursor); - QString content = cursor.selection().toPlainText(); - selectedLines = content.count("\n")+1; + QStringList content = cursor.selection().toPlainText().split("\n"); + + selectedLines = content.size(); + + if (!selectedLines) + return; auto getSelectedLineNumber = [&cursor] () { int lineNumber = 0; - while(cursor.positionInBlock()>0) { - cursor.movePosition(QTextCursor::Up); + QTextCursor _cursor = cursor; + _cursor.select(QTextCursor::LineUnderCursor); + + while(_cursor.positionInBlock()>0) { + _cursor.movePosition(QTextCursor::Up); lineNumber++; } - QTextBlock block = cursor.block().previous(); + QTextBlock block = _cursor.block().previous(); while(block.isValid()) { lineNumber += block.lineCount(); @@ -1157,36 +1164,28 @@ void EditWindow::updateSelectedParts() { cursor.beginEditBlock(); - while (currentLine != selectedLines) + while (currentLine < selectedLines) { - cursor.select(QTextCursor::LineUnderCursor); - QString selection = cursor.selectedText(); - _textEdit->moveCursor(QTextCursor::StartOfLine); - - if (!selection.isEmpty()) + QString selection = content.at(currentLine); + if (content.at(currentLine).startsWith("1") || + content.at(currentLine).contains(" PLI BEGIN SUB ")) { - if (selection.startsWith("1") || selection.contains(" PLI BEGIN SUB ")) { - int lineNumber = getSelectedLineNumber(); - TypeLine typeLine(fileOrderIndex,lineNumber); - lineTypeIndexes.append(typeLine); - toggleLines.append(lineNumber); - clearSelection = savedSelection.contains(lineNumber); - highlightSelectedLines(toggleLines, clearSelection); // toggle On/Off - toggleLines.clear(); - if (clearSelection) - savedSelection.removeAll(lineNumber); - else - savedSelection.append(lineNumber); - } - - // go to next selected line - if (++currentLine < selectedLines) { - cursor.movePosition(QTextCursor::Down); - _textEdit->setTextCursor(cursor); - } - } else { - break; + int lineNumber = getSelectedLineNumber(); + TypeLine typeLine(fileOrderIndex,lineNumber); + lineTypeIndexes.append(typeLine); + toggleLines.append(lineNumber); + clearSelection = savedSelection.contains(lineNumber); + highlightSelectedLines(toggleLines, clearSelection); + if (clearSelection) + savedSelection.removeAll(lineNumber); + else + savedSelection.append(lineNumber); + toggleLines.clear(); } + // set next selected line + cursor.movePosition(QTextCursor::Down); + _textEdit->setTextCursor(cursor); + currentLine++; } // restore selection diff --git a/mainApp/org.trevorsandy.lpub3d.appdata.xml b/mainApp/org.trevorsandy.lpub3d.appdata.xml index 7e8dcc940..1bfeff0bf 100644 --- a/mainApp/org.trevorsandy.lpub3d.appdata.xml +++ b/mainApp/org.trevorsandy.lpub3d.appdata.xml @@ -68,7 +68,7 @@ lpub3d24 - +

LPub3D Linux AppImage package