mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-21 21:32:26 +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):
|
class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
|
|
||||||
dictChanged = pyqtSignal(str)
|
dictChanged = pyqtSignal(str)
|
||||||
|
|
||||||
|
# Tab indexes
|
||||||
TabInfos = 0
|
TabInfos = 0
|
||||||
TabSummary = 1
|
TabSummary = 1
|
||||||
TabPersos = 2
|
TabPersos = 2
|
||||||
|
|
|
@ -504,7 +504,7 @@ def open(ref):
|
||||||
item = mw.lstPersos.getItemByID(_ref)
|
item = mw.lstPersos.getItemByID(_ref)
|
||||||
|
|
||||||
if item:
|
if item:
|
||||||
mw.tabMain.setCurrentIndex(2)
|
mw.tabMain.setCurrentIndex(mw.TabPersos)
|
||||||
mw.lstPersos.setCurrentItem(item)
|
mw.lstPersos.setCurrentItem(item)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ def open(ref):
|
||||||
index = mw.mdlOutline.getIndexByID(_ref)
|
index = mw.mdlOutline.getIndexByID(_ref)
|
||||||
|
|
||||||
if index.isValid():
|
if index.isValid():
|
||||||
mw.tabMain.setCurrentIndex(6)
|
mw.tabMain.setCurrentIndex(mw.TabRedac)
|
||||||
mw.mainEditor.setCurrentModelIndex(index, newTab=True)
|
mw.mainEditor.setCurrentModelIndex(index, newTab=True)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
@ -528,7 +528,7 @@ def open(ref):
|
||||||
item = mw.lstPlots.getItemByID(_ref)
|
item = mw.lstPlots.getItemByID(_ref)
|
||||||
|
|
||||||
if item:
|
if item:
|
||||||
mw.tabMain.setCurrentIndex(3)
|
mw.tabMain.setCurrentIndex(mw.TabPlots)
|
||||||
mw.lstPlots.setCurrentItem(item)
|
mw.lstPlots.setCurrentItem(item)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -540,7 +540,7 @@ def open(ref):
|
||||||
item = mw.mdlWorld.itemByID(_ref)
|
item = mw.mdlWorld.itemByID(_ref)
|
||||||
|
|
||||||
if item:
|
if item:
|
||||||
mw.tabMain.setCurrentIndex(4)
|
mw.tabMain.setCurrentIndex(mw.TabWorld)
|
||||||
mw.treeWorld.setCurrentIndex(
|
mw.treeWorld.setCurrentIndex(
|
||||||
mw.mdlWorld.indexFromItem(item))
|
mw.mdlWorld.indexFromItem(item))
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue