Fix for SANKORE-868. Insertion of sound/video (silent mode) works proper now.

preferencesAboutTextFull
Aleksei Kanash 12 years ago
parent 5442d2fe2f
commit 7572c07bf0
  1. 6
      src/domain/UBGraphicsMediaItem.cpp
  2. 1
      src/domain/UBGraphicsMediaItem.h
  3. 4
      src/domain/UBGraphicsMediaItemDelegate.cpp

@ -188,6 +188,12 @@ void UBGraphicsMediaItem::clearSource()
void UBGraphicsMediaItem::toggleMute() void UBGraphicsMediaItem::toggleMute()
{ {
mMuted = !mMuted; mMuted = !mMuted;
setMute(mMuted);
}
void UBGraphicsMediaItem::setMute(bool bMute)
{
mMuted = bMute;
mAudioOutput->setMuted(mMuted); mAudioOutput->setMuted(mMuted);
mMutedByUserAction = mMuted; mMutedByUserAction = mMuted;
sIsMutedByDefault = mMuted; sIsMutedByDefault = mMuted;

@ -109,6 +109,7 @@ public:
public slots: public slots:
void toggleMute(); void toggleMute();
void setMute(bool bMute);
void activeSceneChanged(); void activeSceneChanged();
void hasMediaChanged(bool hasMedia); void hasMediaChanged(bool hasMedia);
void showOnDisplayChanged(bool shown); void showOnDisplayChanged(bool shown);

@ -52,6 +52,10 @@ UBGraphicsMediaItemDelegate::UBGraphicsMediaItemDelegate(UBGraphicsMediaItem* pD
connect(mToolBarShowTimer, SIGNAL(timeout()), this, SLOT(hideToolBar())); connect(mToolBarShowTimer, SIGNAL(timeout()), this, SLOT(hideToolBar()));
mToolBarShowTimer->setInterval(m_iToolBarShowingInterval); mToolBarShowTimer->setInterval(m_iToolBarShowingInterval);
} }
if (delegated()->isMuted())
{
delegated()->setMute(true);
}
} }
bool UBGraphicsMediaItemDelegate::mousePressEvent(QGraphicsSceneMouseEvent *event) bool UBGraphicsMediaItemDelegate::mousePressEvent(QGraphicsSceneMouseEvent *event)

Loading…
Cancel
Save