Skip to content
GitLab
Menu
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
70223d66
Commit
70223d66
authored
Oct 16, 2020
by
Vivek Yadav
Browse files
Update effectlistwidget.cpp
parent
b5c08831
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/effects/effectlist/view/effectlistwidget.cpp
View file @
70223d66
...
...
@@ -113,9 +113,13 @@ void EffectListWidget::editCustomAsset(const QModelIndex &index)
QDialog
dialog
(
this
);
QFormLayout
form
(
&
dialog
);
QString
currentName
=
getName
(
index
);
QString
desc
=
getDescription
(
true
,
index
);
// Strip effect Name
if
(
desc
.
contains
(
QLatin1Char
(
'('
)))
{
desc
=
desc
.
section
(
QLatin1Char
(
'('
),
0
,
-
2
).
simplified
();
}
QLineEdit
*
effectName
=
new
QLineEdit
(
currentName
,
&
dialog
);
QTextEdit
*
descriptionBox
=
new
QTextEdit
(
getDescription
(
true
,
index
),
&
dialog
);
QString
currentDescription
=
descriptionBox
->
toPlainText
();
QTextEdit
*
descriptionBox
=
new
QTextEdit
(
desc
,
&
dialog
);
form
.
addRow
(
i18n
(
"Name : "
),
effectName
);
form
.
addRow
(
i18n
(
"Comments : "
),
descriptionBox
);
QDialogButtonBox
buttonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
Qt
::
Horizontal
,
&
dialog
);
...
...
@@ -129,10 +133,6 @@ void EffectListWidget::editCustomAsset(const QModelIndex &index)
return
;
}
if
(
enteredDescription
.
trimmed
().
right
(
currentName
.
size
()
+
2
)
==
"("
+
currentName
+
")"
){
//removing previous effect name from the string
enteredDescription
=
enteredDescription
.
left
(
enteredDescription
.
size
()
-
currentName
.
size
()
-
2
);
}
m_model
->
editCustomAsset
(
name
,
enteredDescription
,
m_proxyModel
->
mapToSource
(
index
));
}
}
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