forked from openlp/openlp
Remove flickering when single click option is active
bzr-revno: 2383
This commit is contained in:
commit
c1aebc2771
@ -495,8 +495,8 @@ s
|
||||
if service_item:
|
||||
service_item.from_plugin = True
|
||||
self.preview_controller.add_service_item(service_item)
|
||||
if keep_focus:
|
||||
self.list_view.setFocus()
|
||||
if not keep_focus:
|
||||
self.preview_controller.preview_widget.setFocus()
|
||||
|
||||
def on_live_click(self):
|
||||
"""
|
||||
@ -535,6 +535,7 @@ s
|
||||
if remote:
|
||||
service_item.will_auto_start = True
|
||||
self.live_controller.add_service_item(service_item)
|
||||
self.live_controller.preview_widget.setFocus()
|
||||
|
||||
def create_item_from_id(self, item_id):
|
||||
"""
|
||||
|
@ -136,7 +136,6 @@ class ListPreviewWidget(QtGui.QTableWidget, RegistryProperties):
|
||||
if self.service_item.is_text():
|
||||
self.resizeRowsToContents()
|
||||
self.setColumnWidth(0, self.viewport().width())
|
||||
self.setFocus()
|
||||
self.change_slide(slide_number)
|
||||
|
||||
def change_slide(self, slide):
|
||||
|
0
scripts/jenkins_script.py
Normal file → Executable file
0
scripts/jenkins_script.py
Normal file → Executable file
@ -197,3 +197,19 @@ class TestUi(TestCase):
|
||||
|
||||
# THEN: The index should have changed
|
||||
self.assertEqual(2, combo.currentIndex())
|
||||
|
||||
def test_set_case_insensitive_completer(self):
|
||||
"""
|
||||
Test setting a case insensitive completer on a widget
|
||||
"""
|
||||
# GIVEN: A QComboBox and a list of completion items
|
||||
line_edit = QtGui.QLineEdit()
|
||||
suggestions = ['one', 'Two', 'THRee', 'FOUR']
|
||||
|
||||
# WHEN: We call the function
|
||||
set_case_insensitive_completer(suggestions, line_edit)
|
||||
|
||||
# THEN: The Combobox should have a completer which is case insensitive
|
||||
completer = line_edit.completer()
|
||||
self.assertIsInstance(completer, QtGui.QCompleter)
|
||||
self.assertEqual(completer.caseSensitivity(), QtCore.Qt.CaseInsensitive)
|
||||
|
Loading…
Reference in New Issue
Block a user