← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol-hush/openlp/slidecontroller into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol-hush/openlp/slidecontroller into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol-hush/openlp/slidecontroller/+merge/44946

Hello!

This fixes edge cases, where the slidecontrollers will not be updated correctly.

(Make sure, that the Media Manager is on the left side and the Theme and Service Manager on the right hand side.)

1) Hide the Theme Manager by pressing F10
2) Hide the Service Manager by pressing F9 (first case)
3) Increase the size of the slidecontrollers.
4) Show the Service Manager by pressing F9 (second case)

I removed the paintEvent from the slidecontroller and inserted it in mainwindow. I do like it the other way around, but doing it this way fixes the edge cases.
-- 
https://code.launchpad.net/~googol-hush/openlp/slidecontroller/+merge/44946
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/slidecontroller into lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2010-12-29 17:26:03 +0000
+++ openlp/core/ui/mainwindow.py	2010-12-31 08:21:58 +0000
@@ -747,6 +747,13 @@
         """
         self.settingsForm.exec_()
 
+    def paintEvent(self, event):
+        """
+        We need to make sure, that the SlidePreview's size is correct.
+        """
+        self.previewController.previewSizeChanged()
+        self.liveController.previewSizeChanged()
+
     def onSettingsShortcutsItemClicked(self):
         """
         Show the shortcuts dialog

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2010-12-30 09:13:39 +0000
+++ openlp/core/ui/slidecontroller.py	2010-12-31 08:21:58 +0000
@@ -377,26 +377,11 @@
         QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'slidecontroller_%s_text_request' % self.typePrefix),
             self.onTextRequest)
-        QtCore.QObject.connect(self.parent.ControlSplitter,
-            QtCore.SIGNAL(u'splitterMoved(int, int)'), self.previewSizeChanged)
-        QtCore.QObject.connect(self.Splitter,
-            QtCore.SIGNAL(u'splitterMoved(int, int)'), self.previewSizeChanged)
         QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'config_updated'), self.refreshServiceItem)
         QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
 
-    def paintEvent(self, event):
-        """
-        When the Slidecontroller is painted, we need to make sure, that the
-        SlidePreview's size is updated.
-        """
-        # We need to make this circuit, because we have to consider the other
-        # slidecontroller as well.
-        log.debug(u'paintEvent live = %s' % self.isLive)
-        self.parent.previewController.previewSizeChanged()
-        self.parent.liveController.previewSizeChanged()
-
     def screenSizeChanged(self):
         """
         Settings dialog has changed the screen size of adjust output and


Follow ups