mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-03 20:42:33 +12:00
Mainwindow tab indexes
This commit is contained in:
parent
a022a1d1b4
commit
4e4be8e0c9
|
@ -31,7 +31,8 @@ except ImportError:
|
|||
class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
|
||||
dictChanged = pyqtSignal(str)
|
||||
|
||||
|
||||
# Tab indexes
|
||||
TabInfos = 0
|
||||
TabSummary = 1
|
||||
TabPersos = 2
|
||||
|
|
|
@ -504,7 +504,7 @@ def open(ref):
|
|||
item = mw.lstPersos.getItemByID(_ref)
|
||||
|
||||
if item:
|
||||
mw.tabMain.setCurrentIndex(2)
|
||||
mw.tabMain.setCurrentIndex(mw.TabPersos)
|
||||
mw.lstPersos.setCurrentItem(item)
|
||||
return True
|
||||
|
||||
|
@ -516,7 +516,7 @@ def open(ref):
|
|||
index = mw.mdlOutline.getIndexByID(_ref)
|
||||
|
||||
if index.isValid():
|
||||
mw.tabMain.setCurrentIndex(6)
|
||||
mw.tabMain.setCurrentIndex(mw.TabRedac)
|
||||
mw.mainEditor.setCurrentModelIndex(index, newTab=True)
|
||||
return True
|
||||
else:
|
||||
|
@ -528,7 +528,7 @@ def open(ref):
|
|||
item = mw.lstPlots.getItemByID(_ref)
|
||||
|
||||
if item:
|
||||
mw.tabMain.setCurrentIndex(3)
|
||||
mw.tabMain.setCurrentIndex(mw.TabPlots)
|
||||
mw.lstPlots.setCurrentItem(item)
|
||||
return True
|
||||
|
||||
|
@ -540,7 +540,7 @@ def open(ref):
|
|||
item = mw.mdlWorld.itemByID(_ref)
|
||||
|
||||
if item:
|
||||
mw.tabMain.setCurrentIndex(4)
|
||||
mw.tabMain.setCurrentIndex(mw.TabWorld)
|
||||
mw.treeWorld.setCurrentIndex(
|
||||
mw.mdlWorld.indexFromItem(item))
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue