diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94d64de0d..f9503df8e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,6 @@ cmake_minimum_required(VERSION 3.5.0)
#endif()
set(QT_MIN_VERSION "5.15.0")
-
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/ ${CMAKE_SOURCE_DIR}/cmake/3rdparty/ ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
@@ -44,7 +43,7 @@ include(CMakePackageConfigHelpers)
include(ECMOptionalAddSubdirectory)
-include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS})
+include_directories(${Qt${QT_VERSION_MAJOR}Core_PRIVATE_INCLUDE_DIRS})
# forbid some old things
add_definitions(-DQT_NO_FOREACH)
@@ -59,7 +58,7 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
-set(BREEZEICONS_DIR ${CMAKE_SOURCE_DIR}/3rdparty/breeze-icons/)
+#set(BREEZEICONS_DIR ${CMAKE_SOURCE_DIR}/3rdparty/breeze-icons/)
set(CMAKE_CXX_STANDARD 14)
#set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/README.md b/README.md
index 88c8b97a6..bae892b72 100755
--- a/README.md
+++ b/README.md
@@ -26,9 +26,9 @@ Short term goal is to rejoin its ancestor Plume Creator feature-wise. A few outs
- **spellcheking**
- **color themes**
- **overview of all texts**
+- **character/word count**
- advanced search/replace
- display quickly the end of the previous text and the beginning of the next text
-- character/word count
- character/word goal
- exporting to .txt/.odt/.PDF
- printing
@@ -84,17 +84,36 @@ Needed sources and libs :
### Linux
-#### Flatpak prerequisites
+#### By hand, for development
+
+Needed sources and libs :
+- hunspell (devel)
+- zlib (devel)
+- quazip (devel), version 1.1 minimum needed. Install it by hand.
+
+Minimum Qt : 5.15
+If you have not Qt 5.15, use the Qt installer found at [Qt website](https://www.qt.io/download-open-source)
+Install 5.15 Desktop or superior and Qt Creator
+Open the project using the CMakeLists.txt file
+Build and run it
+
+
+#### Flatpak
+
+##### Flatpak prerequisites
- make sure to have *flatpak* and *flatpak-builder* installed on your system
Prerequisites (>1Go):
```
+flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.kde.Sdk//5.15
flatpak install flathub org.kde.Platform//5.15
```
-#### Flatpak from GitHub master branch :
+Older flatpak-builder doesn't support YAML manifest files. Convert it to JSON using one of the online website easily found, then place the new file by eu.skribisto.skribisto.yml. Adapt the flatpak commands to point to this new file instead of the .yml file.
+
+##### Flatpak from GitHub master branch :
- type in a terminal :
@@ -102,10 +121,10 @@ flatpak install flathub org.kde.Platform//5.15
Compile :
```
-mkdir Devel
+mkdir ~/Devel
cd ~/Devel
git clone https://github.com/jacquetc/skribisto.git
-flatpak-builder --user --repo=local-repo build-dir skribisto/eu.skribisto.skribisto.yml --force-clean
+flatpak-builder --user --repo=local-repo build-dir skribisto/package/flatpak/eu.skribisto.skribisto.yml --force-clean
```
Run only once :
@@ -117,16 +136,16 @@ flatpak --user remote-add --no-gpg-verify local-repo local-repo
Install :
```
-flatpak install eu.skribisto.skribisto -y --reinstall
+flatpak install local-repo eu.skribisto.skribisto -y --reinstall
```
Later, when a new version is online, you can update with this single line:
```
-cd ~/Devel && flatpak-builder --user --repo=local-repo build-dir skribisto/eu.skribisto.skribisto.yml --force-clean && flatpak install eu.skribisto.skribisto -y --reinstall
+cd ~/Devel && flatpak-builder --user --repo=local-repo build-dir skribisto/package/flatpak/eu.skribisto.skribisto.yml --force-clean && flatpak install local-repo eu.skribisto.skribisto -y --reinstall
```
-#### Flatpak from local source code:
+##### Flatpak from local source code:
You can copy/paste in ~/Devel/ the file *eu.skribisto.skribisto* found in \[skribisto-repo\]/package/flatpak/local/
@@ -135,10 +154,10 @@ Near the end of the file, in **skribisto** build module, adapt **path:** to your
```
-mkdir Devel
+mkdir ~/Devel
cd ~/Devel
git clone https://github.com/jacquetc/skribisto.git
-flatpak-builder --user --repo=local-repo build-dir eu.skribisto.skribisto.yml --force-clean
+flatpak-builder --user --repo=local-repo build-dir skribisto/package/flatpak/local/eu.skribisto.skribisto.yml --force-clean
```
Run only once :
@@ -147,19 +166,17 @@ flatpak build-update-repo local-repo
flatpak --user remote-add --no-gpg-verify local-repo local-repo
```
-
-
Install :
```
-flatpak install eu.skribisto.skribisto -y --reinstall
+flatpak install local-repo eu.skribisto.skribisto -y --reinstall
```
After you modified the code you want in whichever git branch you want, type this command :
```
-flatpak-builder --user --repo=local-repo build-dir eu.skribisto.skribisto.yml --force-clean
-flatpak install eu.skribisto.skribisto -y --reinstall
+cd ~/Devel && flatpak-builder --user --repo=local-repo build-dir skribisto/package/flatpak/local/eu.skribisto.skribisto.yml --force-clean
+flatpak install local-repo eu.skribisto.skribisto -y --reinstall
```
## To contact me :
diff --git a/eu.skribisto.skribisto.appdata.xml b/eu.skribisto.skribisto.appdata.xml
index 20b710586..3edd24e87 100644
--- a/eu.skribisto.skribisto.appdata.xml
+++ b/eu.skribisto.skribisto.appdata.xml
@@ -11,12 +11,13 @@
Touch-friendly and dynamic, the user can create and organize text papers (called "sheets"). Exactly the same is possible with the notes. Sheets can link to a synopsis and multiple notes, or create them on the fly while writing.
-
-
+
- https://raw.githubusercontent.com/jacquetc/skribisto/develop/resources/skribisto_screenshot.png
+ https://raw.githubusercontent.com/jacquetc/skribisto/master/resources/skribisto_screenshot1.png
+ https://raw.githubusercontent.com/jacquetc/skribisto/master/resources/skribisto_screenshot2.png
+ https://raw.githubusercontent.com/jacquetc/skribisto/master/resources/skribisto_screenshot3.png
diff --git a/package/flatpak/eu.skribisto.skribisto.json b/package/flatpak/eu.skribisto.skribisto.json
new file mode 100644
index 000000000..069906f99
--- /dev/null
+++ b/package/flatpak/eu.skribisto.skribisto.json
@@ -0,0 +1,85 @@
+{
+ "app-id": "eu.skribisto.skribisto",
+ "runtime": "org.kde.Platform",
+ "runtime-version": "5.15",
+ "sdk": "org.kde.Sdk",
+ "command": "skribisto",
+ "finish-args": [
+ "--share=ipc",
+ "--socket=x11",
+ "--socket=wayland",
+ "--filesystem=host",
+ "--device=dri"
+ ],
+ "separate-locales": false,
+ "modules": [
+ {
+ "name": "openjpeg2",
+ "buildsystem": "cmake-ninja",
+ "config-opts": [
+ "-DCMAKE_INSTALL_LIBDIR=lib"
+ ],
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz",
+ "sha256": "3dc787c1bb6023ba846c2a0d9b1f6e179f1cd255172bde9eb75b01f1e6c7d71a"
+ }
+ ]
+ },
+ {
+ "name": "sqlite3",
+ "cmake": false,
+ "config-opts": [
+ "--enable-threadsafe",
+ "--enable-threads-override-locks"
+ ],
+ "build-options": {
+ "cflags": "-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_ENABLE_COLUMN_METADATA=1"
+ },
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://sqlite.org/2020/sqlite-autoconf-3330000.tar.gz",
+ "sha256": "106a2c48c7f75a298a7557bcc0d5f4f454e5b43811cc738b7ca294d6956bbb15"
+ }
+ ]
+ },
+ {
+ "name": "quazip",
+ "buildsystem": "cmake-ninja",
+ "builddir": true,
+ "config-opts": [
+ "-DCMAKE_BUILD_TYPE=MinSizeRel"
+ ],
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://github.com/stachenov/quazip/archive/v1.1.tar.gz",
+ "sha256": "54edce9c11371762bd4f0003c2937b5d8806a2752dd9c0fd9085e90792612ad0"
+ },
+ {
+ "type": "shell",
+ "commands": [
+ "sed -i 's|${CMAKE_ROOT}/Modules|share/cmake|' CMakeLists.txt"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "skribisto",
+ "buildsystem": "cmake",
+ "builddir": true,
+ "config-opts": [
+ "-DCMAKE_BUILD_TYPE=MinSizeRel"
+ ],
+ "sources": [
+ {
+ "type": "git",
+ "url": "https://github.com/jacquetc/skribisto.git",
+ "branch": "master"
+ }
+ ]
+ }
+ ]
+}
diff --git a/eu.skribisto.skribisto.yml b/package/flatpak/eu.skribisto.skribisto.yml
similarity index 100%
rename from eu.skribisto.skribisto.yml
rename to package/flatpak/eu.skribisto.skribisto.yml
diff --git a/resources/skribisto_screenshot.png b/resources/skribisto_screenshot.png
deleted file mode 100644
index ba7fe7c78..000000000
Binary files a/resources/skribisto_screenshot.png and /dev/null differ
diff --git a/resources/skribisto_screenshot1.png b/resources/skribisto_screenshot1.png
new file mode 100644
index 000000000..8c0884093
Binary files /dev/null and b/resources/skribisto_screenshot1.png differ
diff --git a/resources/skribisto_screenshot2.png b/resources/skribisto_screenshot2.png
new file mode 100644
index 000000000..794dd9a43
Binary files /dev/null and b/resources/skribisto_screenshot2.png differ
diff --git a/resources/skribisto_screenshot3.png b/resources/skribisto_screenshot3.png
new file mode 100644
index 000000000..331b4429a
Binary files /dev/null and b/resources/skribisto_screenshot3.png differ
diff --git a/src/app/src/qml/Commons/NotePad.qml b/src/app/src/qml/Commons/NotePad.qml
index ccb05de02..0c30afff9 100644
--- a/src/app/src/qml/Commons/NotePad.qml
+++ b/src/app/src/qml/Commons/NotePad.qml
@@ -21,10 +21,12 @@ NotePadForm {
onProjectIdChanged: {
populateNoteListModel()
- openSynopsisTimer.start()
}
onSheetIdChanged: {
populateNoteListModel()
+ }
+
+ function openSynopsis(){
openSynopsisTimer.start()
}
@@ -732,9 +734,6 @@ NotePadForm {
if(!saveCurrentPaperCursorPositionAndYTimer.running){
saveCurrentPaperCursorPositionAndYTimer.start()
}
- if(!contentSaveTimer.running){
- contentSaveTimer.start()
- }
}
@@ -749,8 +748,8 @@ NotePadForm {
//console.log("newCursorPosition", position)
// set positions :
- writingZone.setCursorPosition(position)
- writingZone.flickable.contentY = visibleAreaY
+ noteWritingZone.setCursorPosition(position)
+ noteWritingZone.flickable.contentY = visibleAreaY
}
@@ -762,7 +761,7 @@ NotePadForm {
}
//save cursor position of current document :
- var previousCursorPosition = noteWritingZone.cursorPosition
+ var previousCursorPosition = noteWritingZone.textArea.cursorPosition
//console.log("previousCursorPosition", previousCursorPosition)
var previousY = noteWritingZone.flickable.contentY
//console.log("previousContentY", previousY)
@@ -840,11 +839,14 @@ NotePadForm {
}
openDocument(projectId, synopsisId)
+ root.focusedIndex = -2
var i;
for(i = 0; i < noteRepeater.count; i++) {
noteRepeater.itemAt(i).isOpened = false
}
+ noteWritingZone.forceActiveFocus();
+
}
}
openSynopsisToolButton.action: openSynopsisAction
diff --git a/src/app/src/qml/Commons/NotePadForm.ui.qml b/src/app/src/qml/Commons/NotePadForm.ui.qml
index 5c4fc6f3b..892c84241 100644
--- a/src/app/src/qml/Commons/NotePadForm.ui.qml
+++ b/src/app/src/qml/Commons/NotePadForm.ui.qml
@@ -50,12 +50,11 @@ Item {
SkrLabel {
id: currentNoteTitleLabel
- }
-
- Item {
- id: stretcher
+ elide: Text.ElideRight
+ verticalAlignment: Qt.AlignVCenter
Layout.fillHeight: true
Layout.fillWidth: true
+ Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
}
SkrToolButton {
diff --git a/src/app/src/qml/Note/NotePage.qml b/src/app/src/qml/Note/NotePage.qml
index 1440e50f5..706f4a82f 100644
--- a/src/app/src/qml/Note/NotePage.qml
+++ b/src/app/src/qml/Note/NotePage.qml
@@ -343,9 +343,6 @@ NotePageForm {
}
documentPrivate.contentSaveTimerAllowedToStart = true
- if(!contentSaveTimer.running){
- contentSaveTimer.start()
- }
leftDock.setCurrentPaperId(projectId, paperId)
leftDock.setOpenedPaperId(projectId, paperId)
diff --git a/src/app/src/qml/RootPageForm.ui.qml b/src/app/src/qml/RootPageForm.ui.qml
index a25e59f30..f1e3b7de4 100644
--- a/src/app/src/qml/RootPageForm.ui.qml
+++ b/src/app/src/qml/RootPageForm.ui.qml
@@ -287,7 +287,6 @@ Item {
SkrLabel {
id: statusRightLabel
- text: qsTr("Label")
verticalAlignment: Text.AlignVCenter
Layout.fillHeight: true
}
diff --git a/src/app/src/qml/Welcome/Exporter.qml b/src/app/src/qml/Welcome/Exporter.qml
index 388226c7d..64279d4e1 100644
--- a/src/app/src/qml/Welcome/Exporter.qml
+++ b/src/app/src/qml/Welcome/Exporter.qml
@@ -8,9 +8,23 @@ ExporterForm {
signal goBackButtonClicked()
goBackToolButton.onClicked: goBackButtonClicked()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
onActiveFocusChanged: {
if (activeFocus) {
-
+ tabBar.forceActiveFocus()
}
}
diff --git a/src/app/src/qml/Welcome/ExporterForm.ui.qml b/src/app/src/qml/Welcome/ExporterForm.ui.qml
index a16c6323e..3c89c6df0 100644
--- a/src/app/src/qml/Welcome/ExporterForm.ui.qml
+++ b/src/app/src/qml/Welcome/ExporterForm.ui.qml
@@ -8,6 +8,13 @@ import ".."
Item {
width: 400
height: 400
+ property alias importPlumeProjectButton: importPlumeProjectButton
+ property alias selectFileToolButton: selectFileToolButton
+ property alias fileTextField: fileTextField
+ property alias sheetTree: sheetTree
+ property alias noteTree: noteTree
+ property alias stackView: stackView
+ property alias tabBar: tabBar
property alias goBackToolButton: goBackToolButton
@@ -33,62 +40,108 @@ Item {
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
}
}
-// GridLayout {
-// id: gridLayout5
-// rows: -1
-// columns: 2
-// flow: GridLayout.TopToBottom
-// Layout.alignment: Qt.AlignHCenter
-
-// RowLayout {
-// id: rowLayout
-// Layout.fillWidth: true
-// Layout.maximumWidth: 600
-
-// SkrLabel {
-// id: plumeProjectFileLabel
-// text: qsTr("Plume project file (*.plume) :")
-// }
-// SkrTextField {
-
-// id: plumeProjectFileTextField
-// placeholderText: qsTr("plume project file")
-// Layout.columnSpan: 2
-// Layout.fillWidth: true
-// }
-// SkrButton {
-// id: selectPlumeProjectFileToolButton
-// text: qsTr("Select")
-// }
-// }
-// ColumnLayout {
-// id: columnLayout8
-// SkrLabel {
-// id: plumeProjectDetailLabel
-// text: qsTr(
-// "This project will be imported as : ")
-// }
-// SkrLabel {
-// id: plumeProjectDetailPathLabel
-// }
-// }
-// RowLayout {
-// id: rowLayout8
-// Layout.alignment: Qt.AlignHCenter
-
-// SkrButton {
-// id: importPlumeProjectButton
-// text: qsTr("Import")
-// icon.color: SkrTheme.buttonIcon
-// }
-// }
-// }
-
- Item {
- id: stretcher
- Layout.fillHeight: true
+
+
+ ScrollView {
+ id: scrollView
Layout.fillWidth: true
+ Layout.fillHeight: true
+ clip: true
+
+ ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
+ ScrollBar.vertical.policy: ScrollBar.AsNeeded
+ contentWidth: pillarLayout.width
+ contentHeight: pillarLayout.implicitHeight
+
+
+
+ SKRPillarLayout {
+ id: pillarLayout
+ columns: ((pillarLayout.width / columnWidth) | 0 )
+ width: scrollView.width
+ maxColumns: 1
+
+ ColumnLayout{
+ Layout.fillWidth: true
+
+
+ SkrComboBox{
+ id: projectCombobox
+ }
+
+ SkrTabBar {
+ id: tabBar
+ Layout.fillWidth: true
+ SkrTabButton{
+ id: sheetTab
+ text: qsTr("Sheets")
+ fillTabBarWidth: true
+ closable: false
+ }
+ SkrTabButton{
+ id: noteTab
+ text: qsTr("Notes")
+ fillTabBarWidth: true
+ closable: false
+ }
+ }
+
+ StackView {
+ id: stackView
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ CheckableTree{
+ id: sheetTree
+ }
+
+ CheckableTree{
+ id: noteTree
+
+ }
+
+ }
+
+ }
+
+
+ ColumnLayout{
+ Layout.fillWidth: true
+
+ RowLayout {
+ id: rowLayout
+ Layout.fillWidth: true
+ Layout.maximumWidth: 600
+
+ SkrTextField {
+
+ id: fileTextField
+ placeholderText: qsTr("Destination file")
+ Layout.columnSpan: 2
+ Layout.fillWidth: true
+ }
+ SkrButton {
+ id: selectFileToolButton
+ text: qsTr("Select")
+ }
+ }
+
+ SkrButton {
+ id: importPlumeProjectButton
+ text: qsTr("Export")
+ icon.color: SkrTheme.buttonIcon
+ }
+
+ }
+
+
+
+
+ }
+
}
+
+
}
diff --git a/src/app/src/qml/Welcome/Importer.qml b/src/app/src/qml/Welcome/Importer.qml
index 0bb8bc25f..4e5cc556d 100644
--- a/src/app/src/qml/Welcome/Importer.qml
+++ b/src/app/src/qml/Welcome/Importer.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.4
+import QtQuick 2.15
ImporterForm {
diff --git a/src/app/src/qml/Welcome/PlumeImporterForm.ui.qml b/src/app/src/qml/Welcome/PlumeImporterForm.ui.qml
index 168c570fd..7f9297747 100644
--- a/src/app/src/qml/Welcome/PlumeImporterForm.ui.qml
+++ b/src/app/src/qml/Welcome/PlumeImporterForm.ui.qml
@@ -50,56 +50,56 @@ Item {
- SKRPillarLayout {
- id: pillarLayout
- columns: ((pillarLayout.width / columnWidth) | 0 )
- width: scrollView.width
- maxColumns: 1
-
- RowLayout {
- id: rowLayout
- Layout.fillWidth: true
- Layout.maximumWidth: 800
-
- SkrLabel {
- id: plumeProjectFileLabel
- text: qsTr("Plume project file (*.plume) :")
- }
- SkrTextField {
-
- id: plumeProjectFileTextField
- placeholderText: qsTr("plume project file")
- Layout.columnSpan: 2
+ SKRPillarLayout {
+ id: pillarLayout
+ columns: ((pillarLayout.width / columnWidth) | 0 )
+ width: scrollView.width
+ maxColumns: 1
+
+ RowLayout {
+ id: rowLayout
Layout.fillWidth: true
+ Layout.maximumWidth: 800
+
+ SkrLabel {
+ id: plumeProjectFileLabel
+ text: qsTr("Plume project file (*.plume) :")
+ }
+ SkrTextField {
+
+ id: plumeProjectFileTextField
+ placeholderText: qsTr("plume project file")
+ Layout.columnSpan: 2
+ Layout.fillWidth: true
+ }
+ SkrButton {
+ id: selectPlumeProjectFileToolButton
+ text: qsTr("Select")
+ }
}
- SkrButton {
- id: selectPlumeProjectFileToolButton
- text: qsTr("Select")
- }
- }
- ColumnLayout {
- id: columnLayout8
- SkrLabel {
- id: plumeProjectDetailLabel
- text: qsTr(
- "This project will be imported as : ")
+ ColumnLayout {
+ id: columnLayout8
+ SkrLabel {
+ id: plumeProjectDetailLabel
+ text: qsTr(
+ "This project will be imported as : ")
+ }
+ SkrLabel {
+ id: plumeProjectDetailPathLabel
+ }
}
- SkrLabel {
- id: plumeProjectDetailPathLabel
+ RowLayout {
+ id: rowLayout8
+ Layout.alignment: Qt.AlignHCenter
+
+ SkrButton {
+ id: importPlumeProjectButton
+ text: qsTr("Import")
+ icon.color: SkrTheme.buttonIcon
+ }
}
- }
- RowLayout {
- id: rowLayout8
- Layout.alignment: Qt.AlignHCenter
-
- SkrButton {
- id: importPlumeProjectButton
- text: qsTr("Import")
- icon.color: SkrTheme.buttonIcon
- }
- }
- }
+ }
}
diff --git a/src/app/src/qml/Write/WritePage.qml b/src/app/src/qml/Write/WritePage.qml
index 809c8b7da..e2aae1b69 100644
--- a/src/app/src/qml/Write/WritePage.qml
+++ b/src/app/src/qml/Write/WritePage.qml
@@ -354,9 +354,6 @@ WritePageForm {
}
documentPrivate.contentSaveTimerAllowedToStart = true
- if(!contentSaveTimer.running){
- contentSaveTimer.start()
- }
leftDock.setCurrentPaperId(projectId, paperId)
diff --git a/src/app/src/qml/Write/WriteRightDock.qml b/src/app/src/qml/Write/WriteRightDock.qml
index a5bd3af6b..bd3f91a97 100644
--- a/src/app/src/qml/Write/WriteRightDock.qml
+++ b/src/app/src/qml/Write/WriteRightDock.qml
@@ -172,6 +172,7 @@ WriteRightDockForm {
}
onPaperIdChanged: {
notePadView.sheetId = paperId
+ notePadView.openSynopsis()
tagPadView.itemId = paperId
}
diff --git a/src/app/src/qml/WriteOverview/SheetOverviewTree.qml b/src/app/src/qml/WriteOverview/SheetOverviewTree.qml
index 93d0639e6..2d2f189be 100644
--- a/src/app/src/qml/WriteOverview/SheetOverviewTree.qml
+++ b/src/app/src/qml/WriteOverview/SheetOverviewTree.qml
@@ -902,9 +902,6 @@ SheetOverviewTreeForm {
saveCurrentPaperCursorPositionAndYTimer.start()
}
documentPrivate.contentSaveTimerAllowedToStart = true
- if(!contentSaveTimer.running){
- contentSaveTimer.start()
- }
}
diff --git a/src/app/src/skrtextbridge.cpp b/src/app/src/skrtextbridge.cpp
index 0d182111a..122ad4123 100644
--- a/src/app/src/skrtextbridge.cpp
+++ b/src/app/src/skrtextbridge.cpp
@@ -356,17 +356,25 @@ void SKRTextBridge::useTextBridge(int position, int charsRemoved, int charsAdded
QTextDocument *otherTextDocument = syncDoc.qQuickTextDocument()->textDocument();
- QTextCursor selectionCursor =
+ QTextCursor otherDocSelectionCursor =
otherTextDocument->rootFrame()->firstCursorPosition();
// remove
- selectionCursor.setPosition(position, QTextCursor::MoveAnchor);
- selectionCursor.setPosition(position + charsRemoved, QTextCursor::KeepAnchor);
- selectionCursor.removeSelectedText();
+ otherDocSelectionCursor.setPosition(position, QTextCursor::MoveAnchor);
+ otherDocSelectionCursor.setPosition(position + charsRemoved, QTextCursor::KeepAnchor);
+ otherDocSelectionCursor.removeSelectedText();
// add
- selectionCursor.setPosition(position, QTextCursor::MoveAnchor);
- selectionCursor.insertFragment(docFragment);
+ otherDocSelectionCursor.setPosition(position, QTextCursor::MoveAnchor);
+ otherDocSelectionCursor.insertFragment(docFragment);
+
+
+ //fail safe :
+ otherDocSelectionCursor.setPosition(position + charsAdded, QTextCursor::MoveAnchor);
+ if(otherDocSelectionCursor.block().text().size() != selectionCursor.block().text().size()){
+ otherTextDocument->setMarkdown(textDocument->toMarkdown());
+ qDebug() << "failsafe used for " << senderSyncDoc.paperType() << senderSyncDoc.projectId() << senderSyncDoc.paperId();
+ }
this->connectContentsChangeSignal(syncDoc);
}
diff --git a/src/translations/skribisto_de_DE.ts b/src/translations/skribisto_de_DE.ts
index d3a22dafa..1ef6d4fe7 100644
--- a/src/translations/skribisto_de_DE.ts
+++ b/src/translations/skribisto_de_DE.ts
@@ -715,6 +715,26 @@
<h2>Export</h2>
+
+ Sheets
+
+
+
+ Notes
+ Notizen
+
+
+ Destination file
+
+
+
+ Select
+
+
+
+ Export
+
+
FileMenuPage
@@ -3003,10 +3023,6 @@ Bitte öffnen Sie eine Plume-Datei.
Save
-
- Label
-
-
Show list of tabs
diff --git a/src/translations/skribisto_fr_FR.ts b/src/translations/skribisto_fr_FR.ts
index 54fc03428..1836ed007 100644
--- a/src/translations/skribisto_fr_FR.ts
+++ b/src/translations/skribisto_fr_FR.ts
@@ -270,6 +270,26 @@
<h2>Export</h2>
+
+ Sheets
+
+
+
+ Notes
+ Notes
+
+
+ Destination file
+
+
+
+ Select
+ Sélectionner
+
+
+ Export
+ Exporter
+
FileMenuPage
@@ -974,7 +994,7 @@
Label
- Libelé
+ Libelé
Main menu
diff --git a/src/translations/skribisto_it_IT.ts b/src/translations/skribisto_it_IT.ts
index 76b8bd8df..323ff8d90 100644
--- a/src/translations/skribisto_it_IT.ts
+++ b/src/translations/skribisto_it_IT.ts
@@ -591,6 +591,26 @@
<h2>Export</h2>
+
+ Sheets
+
+
+
+ Notes
+ Note
+
+
+ Destination file
+
+
+
+ Select
+
+
+
+ Export
+
+
FileMenuPage
@@ -2639,10 +2659,6 @@ Please open a .plume file.
Save
-
- Label
-
-
Show list of tabs
diff --git a/src/translations/skribisto_pt_BR.ts b/src/translations/skribisto_pt_BR.ts
index 94692c294..0ffba3794 100644
--- a/src/translations/skribisto_pt_BR.ts
+++ b/src/translations/skribisto_pt_BR.ts
@@ -519,6 +519,26 @@
<h2>Export</h2>
+
+ Sheets
+
+
+
+ Notes
+ Notas
+
+
+ Destination file
+
+
+
+ Select
+
+
+
+ Export
+
+
FileMenuPage
@@ -2387,10 +2407,6 @@ not allowed delete a filled book.
Save
-
- Label
-
-
Show list of tabs
diff --git a/src/translations/skribisto_ru_RU.ts b/src/translations/skribisto_ru_RU.ts
index 0dc4df748..6baebec2b 100644
--- a/src/translations/skribisto_ru_RU.ts
+++ b/src/translations/skribisto_ru_RU.ts
@@ -573,6 +573,26 @@
<h2>Export</h2>
+
+ Sheets
+
+
+
+ Notes
+ Заметки
+
+
+ Destination file
+
+
+
+ Select
+
+
+
+ Export
+
+
FileMenuPage
@@ -2656,10 +2676,6 @@ Have you checked the one(s) you want to look through ?
Save
-
- Label
-
-
Show list of tabs
diff --git a/src/translations/skribisto_sp_SP.ts b/src/translations/skribisto_sp_SP.ts
index 159b97bf3..85a71feba 100644
--- a/src/translations/skribisto_sp_SP.ts
+++ b/src/translations/skribisto_sp_SP.ts
@@ -573,6 +573,26 @@
<h2>Export</h2>
+
+ Sheets
+
+
+
+ Notes
+ Notas
+
+
+ Destination file
+
+
+
+ Select
+
+
+
+ Export
+
+
FileMenuPage
@@ -2653,10 +2673,6 @@ Have you checked the one(s) you want to look through ?
Save
-
- Label
-
-
Show list of tabs