summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx2
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx14
2 files changed, 11 insertions, 5 deletions
diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx b/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
index d362048df3db..891c920aed79 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
@@ -54,7 +54,7 @@ namespace sdr::contact
virtual void ActionChanged() override;
private:
- void updateMediaWindow() const;
+ void updateMediaWindow(bool bShow) const;
#if HAVE_FEATURE_AVMEDIA
std::unique_ptr<sdr::contact::SdrMediaWindow> mpMediaWindow;
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
index 0241fabd5661..777017472bf6 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
@@ -87,12 +87,15 @@ Size ViewObjectContactOfSdrMediaObj::getPreferredSize() const
void ViewObjectContactOfSdrMediaObj::ActionChanged()
{
ViewObjectContactOfSdrObj::ActionChanged();
- if (mpMediaWindow && mpMediaWindow->isVisible())
- updateMediaWindow();
+ updateMediaWindow(false);
}
-void ViewObjectContactOfSdrMediaObj::updateMediaWindow() const
+void ViewObjectContactOfSdrMediaObj::updateMediaWindow(bool bShow) const
{
+#if HAVE_FEATURE_AVMEDIA
+ if (!mpMediaWindow || (!bShow && !mpMediaWindow->isVisible()))
+ return;
+
basegfx::B2DRange aViewRange(getObjectRange());
aViewRange.transform(GetObjectContact().getViewInformation2D().getViewTransformation());
@@ -120,6 +123,9 @@ void ViewObjectContactOfSdrMediaObj::updateMediaWindow() const
// through to gtk which will now accept it as the underlying
// m_pSocket of GtkSalObject::SetPosSize is now visible
mpMediaWindow->setPosSize(aViewRectangle);
+#else
+ (void) bShow;
+#endif
}
void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rItem ) const
@@ -137,7 +143,7 @@ void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rIte
}
else
{
- updateMediaWindow();
+ updateMediaWindow(true);
}
#else
(void) rItem;