Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
51ba7e93
Commit
51ba7e93
authored
Feb 10, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix cannot update render filename
parent
92fe66da
Pipeline
#14790
passed with stage
in 16 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/dialogs/renderwidget.cpp
View file @
51ba7e93
...
...
@@ -307,9 +307,8 @@ RenderWidget::RenderWidget(bool enableProxy, QWidget *parent)
// m_view.splitter->setStretchFactor(1, 5);
// m_view.splitter->setStretchFactor(0, 2);
m_view
.
out_file
->
setMode
(
KFile
::
File
);
m_view
.
out_file
->
setAcceptMode
(
QFileDialog
::
AcceptSave
);
m_view
.
out_file
->
setMode
(
KFile
::
File
);
m_view
.
out_file
->
setFocusPolicy
(
Qt
::
ClickFocus
);
m_jobsDelegate
=
new
RenderViewDelegate
(
this
);
...
...
@@ -1886,7 +1885,10 @@ QUrl RenderWidget::filenameWithExtension(QUrl url, const QString &extension)
url
=
QUrl
::
fromLocalFile
(
pCore
->
currentDoc
()
->
projectDataFolder
()
+
QDir
::
separator
());
}
QString
directory
=
url
.
adjusted
(
QUrl
::
RemoveFilename
).
toLocalFile
();
QString
filename
=
pCore
->
currentDoc
()
->
url
().
fileName
();
QString
filename
=
url
.
fileName
();
if
(
filename
.
isEmpty
())
{
filename
=
pCore
->
currentDoc
()
->
url
().
fileName
();
}
QString
ext
;
if
(
extension
.
at
(
0
)
==
'.'
)
{
...
...
@@ -2762,9 +2764,16 @@ void RenderWidget::setRenderProfile(const QMap<QString, QString> &props)
slotUpdateGuideBox
();
QString
url
=
props
.
value
(
QStringLiteral
(
"renderurl"
));
if
(
!
url
.
isEmpty
())
{
m_view
.
out_file
->
setUrl
(
QUrl
::
fromLocalFile
(
url
));
if
(
url
.
isEmpty
())
{
QTreeWidgetItem
*
item
=
m_view
.
formats
->
currentItem
();
if
(
item
&&
item
->
parent
())
{
// categories have no parent
const
QString
extension
=
item
->
data
(
0
,
ExtensionRole
).
toString
();
url
=
filenameWithExtension
(
QUrl
::
fromLocalFile
(
pCore
->
currentDoc
()
->
projectDataFolder
()
+
QDir
::
separator
()),
extension
).
toLocalFile
();
}
}
else
if
(
QFileInfo
(
url
).
isRelative
())
{
url
.
prepend
(
pCore
->
currentDoc
()
->
documentRoot
());
}
m_view
.
out_file
->
setUrl
(
QUrl
::
fromLocalFile
(
url
));
if
(
props
.
contains
(
QStringLiteral
(
"renderprofile"
))
||
props
.
contains
(
QStringLiteral
(
"rendercategory"
)))
{
focusFirstVisibleItem
(
props
.
value
(
QStringLiteral
(
"renderprofile"
)));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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