Fixed video not hiding on 2nd screen when asked to

preferencesAboutTextFull
Craig Watson 9 years ago
parent ca7e8e9254
commit 1925add460
  1. 4
      src/domain/UBGraphicsItemDelegate.h
  2. 10
      src/domain/UBGraphicsMediaItemDelegate.cpp
  3. 1
      src/domain/UBGraphicsMediaItemDelegate.h

@ -40,6 +40,7 @@
#include <QtGui> #include <QtGui>
#include <QtSvg> #include <QtSvg>
#include <QMimeData> #include <QMimeData>
#include <QGraphicsVideoItem>
#include "core/UB.h" #include "core/UB.h"
#include "core/UBSettings.h" #include "core/UBSettings.h"
@ -320,6 +321,8 @@ class UBGraphicsItemDelegate : public QObject
virtual void decorateMenu(QMenu *menu); virtual void decorateMenu(QMenu *menu);
virtual void updateMenuActionState(); virtual void updateMenuActionState();
void showHideRecurs(const QVariant &pShow, QGraphicsItem *pItem);
QList<DelegateButton*> buttons() {return mButtons;} QList<DelegateButton*> buttons() {return mButtons;}
QGraphicsItem* mDelegated; QGraphicsItem* mDelegated;
@ -352,7 +355,6 @@ protected slots:
private: private:
void updateFrame(); void updateFrame();
void updateButtons(bool showUpdated = false); void updateButtons(bool showUpdated = false);
inline void showHideRecurs(const QVariant &pShow, QGraphicsItem *pItem);
QPointF mOffset; QPointF mOffset;
QTransform mPreviousTransform; QTransform mPreviousTransform;

@ -310,3 +310,13 @@ void UBGraphicsMediaItemDelegate::totalTimeChanged(qint64 newTotalTime)
{ {
mMediaControl->totalTimeChanged(newTotalTime); mMediaControl->totalTimeChanged(newTotalTime);
} }
void UBGraphicsMediaItemDelegate::showHide(bool show)
{
QVariant showFlag = QVariant(show ? UBItemLayerType::Object : UBItemLayerType::Control);
showHideRecurs(showFlag, mDelegated);
showHideRecurs(showFlag, delegated()->videoItem());
mDelegated->update();
emit showOnDisplayChanged(show);
}

@ -54,6 +54,7 @@ class UBGraphicsMediaItemDelegate : public UBGraphicsItemDelegate
void toggleMute(); void toggleMute();
void updateTicker(qint64 time); void updateTicker(qint64 time);
virtual void showHide(bool show);
protected slots: protected slots:

Loading…
Cancel
Save