Combined #777 with changes from #827

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
TheJackiMonster 2021-04-10 14:46:03 +02:00
parent 653357d2e9
commit 173531ef2c
No known key found for this signature in database
GPG Key ID: D850A5F772E880F9
3 changed files with 6 additions and 18 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@
.python-version
.settings/org.eclipse.core.resources.prefs
.vscode
.vimrc
ExportTest
Notes.t2t
dist

View File

@ -438,23 +438,10 @@ class abstractModel(QAbstractItemModel):
for item in items:
if item.ID() in IDs:
def makeNewID(item):
k = 1
while True: # Python doesn't have "Do...While"
ks = str(k)
if ks not in IDs:
item.setData(Outline.ID,ks)
IDs.append(ks) #Keep track of new IDs allocated.
for c in item.children():
makeNewID(c)
break # Actual Loop Exit
else:
k = k+1 # Try the next candidate ID
makeNewID(item)
item.getUniqueID(recursive=true)
r = self.insertItems(items, beginRow, parent)
return r
################# ADDING AND REMOVING #################

View File

@ -2,9 +2,10 @@
# Form implementation generated from reading ui file 'manuskript/ui/mainWindow.ui'
#
# Created by: PyQt5 UI code generator 5.14.1
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING! All changes made in this file will be lost!
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
@ -1655,7 +1656,6 @@ class Ui_MainWindow(object):
self.actFormatBlockquote.setText(_translate("MainWindow", "B&lockquote"))
self.actSearch.setText(_translate("MainWindow", "Search"))
self.actSearch.setShortcut(_translate("MainWindow", "Ctrl+F"))
from manuskript.ui.cheatSheet import cheatSheet
from manuskript.ui.editors.mainEditor import mainEditor
from manuskript.ui.search import search