Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
parent
653357d2e9
commit
173531ef2c
|
@ -14,6 +14,7 @@
|
|||
.python-version
|
||||
.settings/org.eclipse.core.resources.prefs
|
||||
.vscode
|
||||
.vimrc
|
||||
ExportTest
|
||||
Notes.t2t
|
||||
dist
|
||||
|
|
|
@ -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 #################
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue