Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
261
Issues
261
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
241af1e8
Commit
241af1e8
authored
Jan 01, 2016
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix several issues when changing project's fps
parent
66eea0af
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
28 deletions
+25
-28
src/doc/kdenlivedoc.cpp
src/doc/kdenlivedoc.cpp
+2
-1
src/doc/kdenlivedoc.h
src/doc/kdenlivedoc.h
+1
-1
src/mainwindow.cpp
src/mainwindow.cpp
+2
-2
src/timeline/customruler.cpp
src/timeline/customruler.cpp
+2
-2
src/timeline/customruler.h
src/timeline/customruler.h
+1
-1
src/timeline/customtrackview.cpp
src/timeline/customtrackview.cpp
+11
-7
src/timeline/customtrackview.h
src/timeline/customtrackview.h
+1
-1
src/timeline/timeline.cpp
src/timeline/timeline.cpp
+4
-11
src/timeline/timeline.h
src/timeline/timeline.h
+1
-2
No files found.
src/doc/kdenlivedoc.cpp
View file @
241af1e8
...
...
@@ -1549,10 +1549,11 @@ void KdenliveDoc::updateProjectProfile()
KdenliveSettings
::
setProject_fps
(
fps
);
m_width
=
m_profile
.
width
;
m_height
=
m_profile
.
height
;
bool
fpsChanged
=
m_timecode
.
fps
()
!=
fps
;
m_timecode
.
setFormat
(
fps
);
KdenliveSettings
::
setCurrent_profile
(
m_profile
.
path
);
pCore
->
monitorManager
()
->
resetProfiles
(
m_profile
,
m_timecode
);
emit
updateFps
();
emit
updateFps
(
fpsChanged
);
}
void
KdenliveDoc
::
resetProfile
()
...
...
src/doc/kdenlivedoc.h
View file @
241af1e8
...
...
@@ -239,7 +239,7 @@ signals:
/** @brief Current doc created effects, reload list */
void
reloadEffects
();
/** @brief Fps was changed, update timeline */
void
updateFps
();
void
updateFps
(
bool
changed
);
};
#endif
...
...
src/mainwindow.cpp
View file @
241af1e8
...
...
@@ -1662,7 +1662,7 @@ void MainWindow::connectDocument()
connect
(
m_effectStack
->
transitionConfig
(),
SIGNAL
(
seekTimeline
(
int
)),
trackView
->
projectView
()
,
SLOT
(
seekCursorPos
(
int
)));
connect
(
trackView
->
projectView
(),
SIGNAL
(
activateDocumentMonitor
()),
m_projectMonitor
,
SLOT
(
slotActivateMonitor
()));
connect
(
project
,
&
KdenliveDoc
::
updateFps
,
trackView
,
&
Timeline
::
updatePro
jectFps
);
connect
(
project
,
&
KdenliveDoc
::
updateFps
,
trackView
,
&
Timeline
::
updatePro
file
);
connect
(
trackView
,
SIGNAL
(
zoneMoved
(
int
,
int
)),
this
,
SLOT
(
slotZoneMoved
(
int
,
int
)));
trackView
->
projectView
()
->
setContextMenu
(
m_timelineContextMenu
,
m_timelineContextClipMenu
,
m_timelineContextTransitionMenu
,
m_clipTypeGroup
,
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"marker_menu"
),
this
)));
if
(
m_renderWidget
)
{
...
...
@@ -1682,7 +1682,7 @@ void MainWindow::connectDocument()
m_normalEditTool
->
setChecked
(
true
);
connect
(
m_projectMonitor
,
SIGNAL
(
durationChanged
(
int
)),
this
,
SLOT
(
slotUpdateProjectDuration
(
int
)));
pCore
->
monitorManager
()
->
setDocument
(
project
);
trackView
->
updatePro
jectFps
(
);
trackView
->
updatePro
file
(
false
);
if
(
m_recMonitor
)
{
m_recMonitor
->
slotUpdateCaptureFolder
(
project
->
projectFolder
().
path
()
+
QDir
::
separator
());
}
...
...
src/timeline/customruler.cpp
View file @
241af1e8
...
...
@@ -302,9 +302,9 @@ void CustomRuler::updateRuler(int pos)
update
(
min
*
m_factor
-
offset
()
-
3
,
BIG_MARK_X
,
(
max
-
min
)
*
m_factor
+
6
,
MAX_HEIGHT
-
BIG_MARK_X
);
}
void
CustomRuler
::
setPixelPerMark
(
int
rate
)
void
CustomRuler
::
setPixelPerMark
(
int
rate
,
bool
force
)
{
if
(
rate
==
m_rate
)
return
;
if
(
rate
==
m_rate
&&
!
force
)
return
;
int
scale
=
comboScale
[
rate
];
m_rate
=
rate
;
m_factor
=
1.0
/
(
double
)
scale
*
FRAME_SIZE
;
...
...
src/timeline/customruler.h
View file @
241af1e8
...
...
@@ -40,7 +40,7 @@ class CustomRuler : public QWidget
public:
CustomRuler
(
const
Timecode
&
tc
,
CustomTrackView
*
parent
);
void
setPixelPerMark
(
int
rate
);
void
setPixelPerMark
(
int
rate
,
bool
force
=
false
);
static
const
int
comboScale
[];
int
outPoint
()
const
;
int
inPoint
()
const
;
...
...
src/timeline/customtrackview.cpp
View file @
241af1e8
...
...
@@ -264,15 +264,19 @@ int CustomTrackView::getFrameWidth() const
return
(
int
)
(
m_tracksHeight
*
m_document
->
dar
()
+
0.5
);
}
void
CustomTrackView
::
updateSceneFrameWidth
()
void
CustomTrackView
::
updateSceneFrameWidth
(
bool
fpsChanged
)
{
int
frameWidth
=
getFrameWidth
();
QList
<
QGraphicsItem
*>
itemList
=
items
();
ClipItem
*
item
;
for
(
int
i
=
0
;
i
<
itemList
.
count
();
++
i
)
{
if
(
itemList
.
at
(
i
)
->
type
()
==
AVWidget
)
{
item
=
static_cast
<
ClipItem
*>
(
itemList
.
at
(
i
));
item
->
resetFrameWidth
(
frameWidth
);
if
(
fpsChanged
&&
m_projectDuration
>
0
)
{
reloadTimeline
();
}
else
{
QList
<
QGraphicsItem
*>
itemList
=
items
();
ClipItem
*
item
;
for
(
int
i
=
0
;
i
<
itemList
.
count
();
++
i
)
{
if
(
itemList
.
at
(
i
)
->
type
()
==
AVWidget
)
{
item
=
static_cast
<
ClipItem
*>
(
itemList
.
at
(
i
));
item
->
resetFrameWidth
(
frameWidth
);
}
}
}
}
...
...
src/timeline/customtrackview.h
View file @
241af1e8
...
...
@@ -103,7 +103,7 @@ public:
void
cutSelectedClips
();
void
setContextMenu
(
QMenu
*
timeline
,
QMenu
*
clip
,
QMenu
*
transition
,
QActionGroup
*
clipTypeGroup
,
QMenu
*
markermenu
);
bool
checkTrackHeight
(
bool
force
=
false
);
void
updateSceneFrameWidth
();
void
updateSceneFrameWidth
(
bool
fpsChanged
=
false
);
void
setTool
(
ProjectTool
tool
);
ClipItem
*
cutClip
(
const
ItemInfo
&
info
,
const
GenTime
&
cutTime
,
bool
cut
,
const
EffectsList
&
oldStack
=
EffectsList
(),
bool
execute
=
true
);
void
slotSeekToPreviousSnap
();
...
...
src/timeline/timeline.cpp
View file @
241af1e8
...
...
@@ -1119,15 +1119,6 @@ void Timeline::slotVerticalZoomUp()
m_trackview
->
verticalScrollBar
()
->
setValue
(
headers_area
->
verticalScrollBar
()
->
value
());
}
void
Timeline
::
updateProjectFps
()
{
qDebug
()
<<
"Requesting FPS UPDATE: "
<<
m_doc
->
timecode
().
fps
();
m_ruler
->
updateFrameSize
();
m_ruler
->
updateProjectFps
(
m_doc
->
timecode
());
m_trackview
->
updateProjectFps
();
slotChangeZoom
(
m_doc
->
zoom
().
x
(),
m_doc
->
zoom
().
y
());
}
void
Timeline
::
slotRenameTrack
(
int
ix
,
const
QString
&
name
)
{
QString
currentName
=
track
(
ix
)
->
getProperty
(
QStringLiteral
(
"kdenlive:track_name"
));
...
...
@@ -1182,12 +1173,14 @@ void Timeline::slotSaveTimelinePreview(const QString &path)
img
.
save
(
path
);
}
void
Timeline
::
updateProfile
()
void
Timeline
::
updateProfile
(
bool
fpsChanged
)
{
m_ruler
->
updateFrameSize
();
m_trackview
->
updateSceneFrameWidth
();
m_ruler
->
updateProjectFps
(
m_doc
->
timecode
());
m_ruler
->
setPixelPerMark
(
m_doc
->
zoom
().
x
(),
true
);
slotChangeZoom
(
m_doc
->
zoom
().
x
(),
m_doc
->
zoom
().
y
());
slotSetZone
(
m_doc
->
zone
(),
false
);
m_trackview
->
updateSceneFrameWidth
(
fpsChanged
);
}
void
Timeline
::
checkTrackHeight
(
bool
force
)
...
...
src/timeline/timeline.h
View file @
241af1e8
...
...
@@ -94,7 +94,6 @@ public:
void
loadGuides
(
QMap
<
double
,
QString
>
guidesData
);
void
checkTrackHeight
(
bool
force
=
false
);
void
updateProfile
();
void
updatePalette
();
void
refreshIcons
();
/** @brief Returns a kdenlive effect xml description from an effect tag / id */
...
...
@@ -156,7 +155,7 @@ public slots:
void
slotSaveTimelinePreview
(
const
QString
&
path
);
void
checkDuration
(
int
duration
);
void
slotShowTrackEffects
(
int
);
void
updatePro
jectFps
(
);
void
updatePro
file
(
bool
fpsChanged
);
private:
Mlt
::
Tractor
*
m_tractor
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment