Index: trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp	(revision 90870)
+++ trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp	(revision 90872)
@@ -708,34 +708,4 @@
         painter.fillRect(fillRect, Qt::white);
         painter.drawPixmap(imageRect, newPixmap, newPixmap.rect());
-    }
-    if (m_pOverlayLabel)
-    {
-        if (m_fOverlayMode && !m_pOverlayLabel->isVisible())
-        {
-            /* Scale the image to 1:1 as long as it fits into avaible space (minus some margins and scrollbar sizes): */
-            int vWidth = 0;
-            if (verticalScrollBar() && verticalScrollBar()->isVisible())
-                vWidth = verticalScrollBar()->width();
-            int hMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) +
-                qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin) + vWidth;
-
-            int hHeight = 0;
-            if (horizontalScrollBar() && horizontalScrollBar()->isVisible())
-                hHeight = horizontalScrollBar()->height();
-            int vMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutTopMargin) +
-                qApp->style()->pixelMetric(QStyle::PM_LayoutBottomMargin) + hHeight;
-
-            QSize size(qMin(width() - hMargin, m_overlayPixmap.width()),
-                       qMin(height() - vMargin, m_overlayPixmap.height()));
-            m_pOverlayLabel->setPixmap(m_overlayPixmap.scaled(size,  Qt::KeepAspectRatio, Qt::SmoothTransformation));
-            m_pOverlayLabel->show();
-
-            /* Center the label: */
-            int x = 0.5 * (width() - vWidth - m_pOverlayLabel->width());
-            int y = 0.5 * (height() - hHeight - m_pOverlayLabel->height());
-            m_pOverlayLabel->move(x, y);
-        }
-        if (!m_fOverlayMode && m_pOverlayLabel->isVisible())
-            m_pOverlayLabel->hide();
     }
 }
@@ -1000,4 +970,5 @@
 void UIHelpViewer::clearOverlay()
 {
+    AssertReturnVoid(m_pOverlayLabel);
     setImageOverCursor(cursor().pos());
 
@@ -1008,4 +979,39 @@
     if (m_pOverlayBlurEffect)
         m_pOverlayBlurEffect->setEnabled(false);
+    m_pOverlayLabel->hide();
+}
+
+void UIHelpViewer::enableOverlay()
+{
+    AssertReturnVoid(m_pOverlayLabel);
+    m_fOverlayMode = true;
+    if (m_pOverlayBlurEffect)
+        m_pOverlayBlurEffect->setEnabled(true);
+    viewport()->setCursor(m_defaultCursor);
+    m_fCursorChanged = false;
+    toggleFindInPageWidget(false);
+
+    /* Scale the image to 1:1 as long as it fits into avaible space (minus some margins and scrollbar sizes): */
+    int vWidth = 0;
+    if (verticalScrollBar() && verticalScrollBar()->isVisible())
+        vWidth = verticalScrollBar()->width();
+    int hMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) +
+        qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin) + vWidth;
+
+    int hHeight = 0;
+    if (horizontalScrollBar() && horizontalScrollBar()->isVisible())
+        hHeight = horizontalScrollBar()->height();
+    int vMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutTopMargin) +
+        qApp->style()->pixelMetric(QStyle::PM_LayoutBottomMargin) + hHeight;
+
+    QSize size(qMin(width() - hMargin, m_overlayPixmap.width()),
+               qMin(height() - vMargin, m_overlayPixmap.height()));
+    m_pOverlayLabel->setPixmap(m_overlayPixmap.scaled(size,  Qt::KeepAspectRatio, Qt::SmoothTransformation));
+    m_pOverlayLabel->show();
+
+    /* Center the label: */
+    int x = 0.5 * (width() - vWidth - m_pOverlayLabel->width());
+    int y = 0.5 * (height() - hHeight - m_pOverlayLabel->height());
+    m_pOverlayLabel->move(x, y);
 }
 
@@ -1039,12 +1045,5 @@
         m_overlayPixmap.loadFromData(fileData,"PNG");
         if (!m_overlayPixmap.isNull())
-        {
-            m_fOverlayMode = true;
-            if (m_pOverlayBlurEffect)
-                m_pOverlayBlurEffect->setEnabled(true);
-            viewport()->setCursor(m_defaultCursor);
-            m_fCursorChanged = false;
-            toggleFindInPageWidget(false);
-        }
+            enableOverlay();
     }
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.h	(revision 90870)
+++ trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.h	(revision 90872)
@@ -129,4 +129,5 @@
     void loadImageAtPosition(const QPoint &globalPosition);
     void clearOverlay();
+    void enableOverlay();
     void setImageOverCursor(QPoint globalPosition);
 
