← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~tomasgroth/openlp/23win-display-fix into lp:openlp

 

Tomas Groth has proposed merging lp:~tomasgroth/openlp/23win-display-fix into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~tomasgroth/openlp/23win-display-fix/+merge/285938

Fix for force-updating display on windows when using themes without transitions.
Pep8 fix + a test.
-- 
Your team OpenLP Core is requested to review the proposed merge of lp:~tomasgroth/openlp/23win-display-fix into lp:openlp.
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2016-02-06 19:43:54 +0000
+++ openlp/core/ui/maindisplay.py	2016-02-12 20:39:04 +0000
@@ -408,7 +408,10 @@
                     self.application.process_events()
                 # Workaround for bug #1531319, should not be needed with PyQt 5.6.
                 if is_win():
+                    # Workaround for bug #1531319, should not be needed with PyQt 5.6.
                     fade_shake_timer.stop()
+            elif is_win():
+                self.shake_web_view()
         # Wait for the webview to update before getting the preview.
         # Important otherwise first preview will miss the background !
         while not self.web_loaded:

=== modified file 'tests/functional/openlp_plugins/songusage/test_songusage.py'
--- tests/functional/openlp_plugins/songusage/test_songusage.py	2016-02-11 21:05:41 +0000
+++ tests/functional/openlp_plugins/songusage/test_songusage.py	2016-02-12 20:39:04 +0000
@@ -65,4 +65,19 @@
         self.assertEqual(mocked_manager, song_usage.manager)
         self.assertFalse(song_usage.song_usage_active)
 
-
+    @patch('openlp.plugins.songusage.songusageplugin.Manager')
+    def check_pre_conditions_test(self, MockedManager):
+        """
+        Test that check_pre_condition returns true for valid manager session
+        """
+        # GIVEN: A mocked database manager
+        mocked_manager = MagicMock()
+        mocked_manager.session = MagicMock()
+        MockedManager.return_value = mocked_manager
+        song_usage = SongUsagePlugin()
+
+        # WHEN: The calling check_pre_conditions
+        ret = song_usage.check_pre_conditions()
+
+        # THEN: It should return True
+        self.assertTrue(ret)

=== modified file 'tests/interfaces/openlp_core_ui/test_shortcutlistform.py'
--- tests/interfaces/openlp_core_ui/test_shortcutlistform.py	2016-02-05 19:01:21 +0000
+++ tests/interfaces/openlp_core_ui/test_shortcutlistform.py	2016-02-12 20:39:04 +0000
@@ -227,4 +227,3 @@
             mocked_action_shortcuts.assert_called_with(mocked_action)
             mocked_refresh_shortcut_list.assert_called_with()
             mocked_set_text.assert_called_with('Esc')
-


References