Fix 2 crashes when clip and project monitor are side by side and resizing or...

Fix 2 crashes when clip and project monitor are side by side and resizing or seeking while the other monitor is playing:
http://kdenlive.org/mantis/view.php?id=2364

svn path=/trunk/kdenlive/; revision=6000
parent f764af9a
......@@ -455,6 +455,13 @@ void Monitor::mousePressEvent(QMouseEvent * event)
}
}
void Monitor::resizeEvent(QResizeEvent *event)
{
Q_UNUSED(event);
if (render && isVisible() && isActive()) render->doRefresh();
}
void Monitor::slotSwitchFullScreen()
{
m_videoBox->switchFullScreen();
......@@ -605,8 +612,8 @@ void Monitor::slotSeek()
void Monitor::slotSeek(int pos)
{
//activateMonitor();
if (render == NULL) return;
activateMonitor();
render->seekToFrame(pos);
}
......@@ -1055,12 +1062,6 @@ void MonitorRefresh::setRenderer(Render* render)
}
void MonitorRefresh::resizeEvent(QResizeEvent *event)
{
Q_UNUSED(event);
if (m_renderer && isVisible()) m_renderer->doRefresh();
}
Overlay::Overlay(QWidget* parent) :
QLabel(parent)
{
......
......@@ -74,16 +74,8 @@ public:
MonitorRefresh(QWidget *parent = 0);
void setRenderer(Render* render);
protected:
virtual void resizeEvent(QResizeEvent *event);
private:
Render *m_renderer;
signals:
void switchFullScreen();
void switchPlay();
void mouseSeek(int, bool);
};
class Overlay : public QLabel
......@@ -133,6 +125,7 @@ public:
protected:
virtual void mousePressEvent(QMouseEvent * event);
virtual void mouseReleaseEvent(QMouseEvent * event);
virtual void resizeEvent(QResizeEvent *event);
/** @brief Move to another position on mouse wheel event.
*
......
......@@ -1486,7 +1486,7 @@ void Render::seekToFrameDiff(int diff)
void Render::doRefresh()
{
m_refreshTimer.start();
if (m_mltProducer && m_mltProducer->get_speed() == 0) m_refreshTimer.start();
}
void Render::refresh()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment