|
1 | 1 | from krita import * |
2 | 2 | try: |
| 3 | + if int(qVersion().split('.')[0]) == 5: |
| 4 | + raise |
3 | 5 | from PyQt6 import QtCore, QtGui, QtWidgets, QtSvg, uic |
4 | 6 | except: |
5 | 7 | from PyQt5 import QtCore, QtGui, QtWidgets, QtSvg, uic |
@@ -1207,16 +1209,18 @@ def __init__(self, caller): |
1207 | 1209 |
|
1208 | 1210 | self.splitHandle = self.caller.centralWidget.inspectorSplitter.handle(1) |
1209 | 1211 | self.splitHandle.setToolTip("Right click to change orientation") |
1210 | | - self.splitHandle.setContextMenuPolicy(Qt.CustomContextMenu) |
| 1212 | + self.splitHandle.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) |
1211 | 1213 | self.splitHandle.customContextMenuRequested.connect(self.splitterAdjust) |
1212 | 1214 | self.firstRun = False |
1213 | 1215 |
|
| 1216 | + self.cacheItems = [] |
| 1217 | + |
1214 | 1218 | def splitterAdjust(self,pos): |
1215 | 1219 |
|
1216 | | - if self.splitHandle.orientation() == Qt.Vertical: |
1217 | | - self.splitHandle.splitter().setOrientation(Qt.Horizontal) |
| 1220 | + if self.splitHandle.orientation() == Qt.Orientation.Vertical: |
| 1221 | + self.splitHandle.splitter().setOrientation(Qt.Orientation.Horizontal) |
1218 | 1222 | else: |
1219 | | - self.splitHandle.splitter().setOrientation(Qt.Vertical) |
| 1223 | + self.splitHandle.splitter().setOrientation(Qt.Orientation.Vertical) |
1220 | 1224 |
|
1221 | 1225 | def selected(self): |
1222 | 1226 | if not self.firstRun: |
@@ -1542,7 +1546,7 @@ def itemSelectionChanged(self, new, old): |
1542 | 1546 | item.setIcon( Krita.instance().icon('window-close') ) |
1543 | 1547 | else: |
1544 | 1548 | self.loadItemInfo( obj ) |
1545 | | - if key == Qt.ControlModifier: |
| 1549 | + if key == Qt.KeyboardModifier.ControlModifier: |
1546 | 1550 | self.treeView.expandRecursively(indexes[0]) |
1547 | 1551 |
|
1548 | 1552 | def loadItemInfo(self, obj): |
|
0 commit comments