Make the girl selection finger-scrollable.
authorv13 <v13>
Fri, 26 Feb 2010 15:48:04 +0000 (15:48 +0000)
committerv13 <v13>
Fri, 26 Feb 2010 15:48:04 +0000 (15:48 +0000)
Select the current girl (even if it isn't shown all the time).

trunk/src/win.py

index b90d3e9..9097a9e 100755 (executable)
@@ -217,6 +217,8 @@ class GirlsDialog(QDialog):
        self.lst=QListView(self)
        self.lst.setModel(self.lstm)
 
+       self.lst.setProperty("FingerScrollable", True)
+
        self.l0.addWidget(self.lst)
 
        self.buttonNew=QPushButton(self)
@@ -263,7 +265,11 @@ class GirlsDialog(QDialog):
 
        # Set current selection
        idx=dt.index(current)
-       self.lst.setCurrentIndex(self.lstm.index(idx))
+
+       # Either I'm doing something stupid, or this is a QT bug
+       # The selection works but isn't shown
+       idx2=self.lstm.index(idx, 0)
+       self.lst.setCurrentIndex(idx2)
 
        # Run
        QDialog.exec_(self)