]> git.sesse.net Git - kdenlive/blobdiff - src/monitor.cpp
Remember render settings for project (zone, guides):
[kdenlive] / src / monitor.cpp
index 924e25d95906fd70bd8180f1548d898c463793b9..25e5808c513bf05482013ba9bd83f11532a91c5a 100644 (file)
@@ -71,7 +71,9 @@ Monitor::Monitor(QString name, MonitorManager *manager, QString profile, QWidget
     if (name != "chapter") {
         toolbar->addAction(KIcon("kdenlive-zone-start"), i18n("Set zone start"), this, SLOT(slotSetZoneStart()));
         toolbar->addAction(KIcon("kdenlive-zone-end"), i18n("Set zone end"), this, SLOT(slotSetZoneEnd()));
-    } else m_ruler->setZone(-3, -2);
+    } else {
+        m_ruler->setZone(-3, -2);
+    }
 
     toolbar->addAction(KIcon("media-seek-backward"), i18n("Rewind"), this, SLOT(slotRewind()));
     toolbar->addAction(KIcon("media-skip-backward"), i18n("Rewind 1 frame"), this, SLOT(slotRewindOneFrame()));
@@ -113,7 +115,6 @@ Monitor::Monitor(QString name, MonitorManager *manager, QString profile, QWidget
     spacer->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
     toolbar->addWidget(spacer);
     m_timePos = new TimecodeDisplay(m_monitorManager->timecode(), this);
-    m_timePos->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding);
     toolbar->addWidget(m_timePos);
     connect(m_timePos, SIGNAL(editingFinished()), this, SLOT(slotSeek()));
 
@@ -519,13 +520,17 @@ void Monitor::checkOverlay()
     if (m_overlay == NULL) return;
     int pos = render->seekFramePosition();
     QPoint zone = m_ruler->zone();
-    if (pos == zone.x()) m_overlay->setOverlayText(i18n("In Point"));
-    else if (pos == zone.y()) m_overlay->setOverlayText(i18n("Out Point"));
+    if (pos == zone.x())
+        m_overlay->setOverlayText(i18n("In Point"));
+    else if (pos == zone.y())
+        m_overlay->setOverlayText(i18n("Out Point"));
     else {
         if (m_currentClip) {
             QString markerComment = m_currentClip->markerComment(GenTime(pos, m_monitorManager->timecode().fps()));
-            if (markerComment.isEmpty()) m_overlay->setHidden(true);
-            else m_overlay->setOverlayText(markerComment, false);
+            if (markerComment.isEmpty())
+                m_overlay->setHidden(true);
+            else
+                m_overlay->setOverlayText(markerComment, false);
         } else m_overlay->setHidden(true);
     }
 }
@@ -759,6 +764,7 @@ void Monitor::slotSaveZone()
 
 void Monitor::resetProfile(const QString profile)
 {
+    m_timePos->updateTimeCode(m_monitorManager->timecode());
     if (render == NULL) return;
     render->resetProfile(profile);
 }
@@ -806,7 +812,7 @@ void Monitor::slotSwitchMonitorInfo(bool show)
 
 void Monitor::updateTimecodeFormat()
 {
-    m_timePos->slotPrepareTimeCodeFormat(m_monitorManager->timecode());
+    m_timePos->slotUpdateTimeCodeFormat();
 }
 
 QStringList Monitor::getZoneInfo() const