Commit 0cdc568d authored by Jason Wood's avatar Jason Wood

monitors now display a range of zero if the project is empty.

svn path=/trunk/kdenlive/; revision=269
parent 3863135e
......@@ -34,7 +34,7 @@ KMMEditPanel::KMMEditPanel(KdenliveDoc *document, QWidget* parent, const char* n
m_document = document;
m_ruler->setRulerModel(new KRulerTimeModel());
m_ruler->setRange(0, 1500);
m_ruler->setRange(0, 0);
m_ruler->setMargin(40);
m_ruler->setAutoClickSlider(0);
......
......@@ -212,7 +212,8 @@ void KMMMonitor::slotSetClip(DocClipBase *clip)
if( (!m_noSeek) ||
(seekPosition() < clip->cropStartTime()) ||
(seekPosition() > clip->cropStartTime() + clip->cropDuration())) {
seek(GenTime(clip->cropStartTime()));
seek(clip->cropStartTime());
m_screen->seek(clip->cropStartTime());
}
}
......
......@@ -126,9 +126,12 @@ void KMMTimeLine::insertTrack(int index, KMMTrackPanel *track)
connect(track->docTrack(), SIGNAL(clipLayoutChanged()), this, SLOT(drawTrackViewBackBuffer()));
connect(track->docTrack(), SIGNAL(clipSelectionChanged()), this, SLOT(drawTrackViewBackBuffer()));
connect(track, SIGNAL(signalClipCropStartChanged(const GenTime &)), this, SIGNAL(signalClipCropStartChanged(const GenTime &)));
connect(track, SIGNAL(signalClipCropEndChanged(const GenTime &)), this, SIGNAL(signalClipCropEndChanged(const GenTime &)));
connect(track, SIGNAL(lookingAtClip(DocClipBase *, const GenTime &)), this, SIGNAL(lookingAtClip(DocClipBase *, const GenTime &)));
connect(track, SIGNAL(signalClipCropStartChanged(const GenTime &)),
this, SIGNAL(signalClipCropStartChanged(const GenTime &)));
connect(track, SIGNAL(signalClipCropEndChanged(const GenTime &)),
this, SIGNAL(signalClipCropEndChanged(const GenTime &)));
connect(track, SIGNAL(lookingAtClip(DocClipBase *, const GenTime &)),
this, SIGNAL(lookingAtClip(DocClipBase *, const GenTime &)));
resizeTracks();
}
......@@ -255,14 +258,22 @@ void KMMTimeLine::dragMoveEvent ( QDragMoveEvent *event )
void KMMTimeLine::dragLeaveEvent ( QDragLeaveEvent *event )
{
m_addingClips = false;
if(!m_selection.isEmpty()) {
m_selection.setAutoDelete(true);
m_selection.clear();
m_selection.setAutoDelete(false);
}
if(m_addingClips) {
m_addingClips = false;
QPtrListIterator<KMMTrackPanel> itt(m_trackList);
while(itt.current() != 0) {
itt.current()->docTrack()->deleteClips(true);
++itt;
}
}
if(m_moveClipsCommand) {
// In a drag Leave Event, any clips in the selection are removed from the timeline.
delete m_moveClipsCommand;
......
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