summaryrefslogtreecommitdiff
path: root/src/ui.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.py')
-rw-r--r--src/ui.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ui.py b/src/ui.py
index b581411..cc2aa0a 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -88,7 +88,6 @@ class KPObjectSelector(QtGui.QWidget):
self.sorterButton.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
self.sorterMenu = QtGui.QMenu()
- self.sorterMenu.setFixedWidth(self.sorterButton.width())
action = self.sorterMenu.addAction("test 1")
self.sorterButton.setMenu(self.sorterMenu)
@@ -114,9 +113,14 @@ class KPObjectSelector(QtGui.QWidget):
# Borrowed the signals and junk from Reggie, figure we'll need em'
self.listView.clicked.connect(self.handleObjReplace)
+ self.sorterMenu.aboutToShow.connect(self.fixUpMenuSize)
self.sorterMenu.triggered.connect(self.toggleTopLevel)
+ def fixUpMenuSize(self):
+ self.sorterMenu.setFixedWidth(self.sorterButton.width())
+
+
def currentSelectedObject(self):
"""Returns the currently selected object reference, for painting purposes."""
@@ -147,12 +151,15 @@ class KPObjectSelector(QtGui.QWidget):
actionMan.setData((item[1], item[2]))
+ # a Quick Fix
+ self.listView.setRowHidden(0, True)
+
def toggleTopLevel(self, action):
"""Changes the top level group in the list view."""
name = str(action.text()).strip()
- startRow = action.data().toPyObject()[0]
+ startRow = action.data().toPyObject()[0] + 1
endRow = action.data().toPyObject()[1]
for row in xrange(self.model.rowCount()):