Correctly load project zone on project opening

parent 0c3fa5fa
......@@ -874,6 +874,7 @@ void ProjectManager::updateTimeline(int pos)
pCore->monitorManager()->projectMonitor()->setProducer(m_mainTimelineModel->producer(), pos);
pCore->window()->getMainTimeline()->setModel(m_mainTimelineModel);
pCore->monitorManager()->projectMonitor()->adjustRulerSize(m_mainTimelineModel->duration() - 1, m_project->getGuideModel());
pCore->window()->getMainTimeline()->controller()->setZone(m_project->zone());
m_mainTimelineModel->setUndoStack(m_project->commandStack());
}
......
......@@ -144,7 +144,7 @@ Rectangle {
root.snapping = timeline.snap ? 10 / Math.sqrt(root.timeScale) : -1
ruler.adjustStepSize()
}
onTimelineSelectionChanged: {
if (root.timelineSelection.length == 0) {
root.dragList = []
......
......@@ -58,6 +58,7 @@ TimelineController::TimelineController(KActionCollection *actionCollection, QObj
, m_activeTrack(0)
, m_scale(3.0)
, m_timelinePreview(nullptr)
, m_zone(-1, -1)
{
m_disablePreview = pCore->currentDoc()->getAction(QStringLiteral("disable_preview"));
connect(m_disablePreview, &QAction::triggered, this, &TimelineController::disablePreview);
......@@ -73,6 +74,7 @@ TimelineController::~TimelineController()
void TimelineController::setModel(std::shared_ptr<TimelineItemModel> model)
{
delete m_timelinePreview;
m_zone = QPoint(-1, -1);
m_timelinePreview = nullptr;
m_model = std::move(model);
connect(m_model.get(), &TimelineItemModel::requestClearAssetView, [&](int id) { pCore->clearAssetPanel(id); });
......
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