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
d5345c47
Commit
d5345c47
authored
Oct 25, 2022
by
Jean-Baptiste Mardelle
Browse files
Enable F2 shortcut to rename bin tags in Tag Widget
parent
ce0b48e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/tagwidget.cpp
View file @
d5345c47
...
...
@@ -186,7 +186,11 @@ void TagWidget::showTagsConfig()
item
->
setFlags
(
Qt
::
ItemIsEnabled
|
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsDragEnabled
);
ix
++
;
}
d
.
connect
(
&
list
,
&
QListWidget
::
itemDoubleClicked
,
&
d
,
[
&
d
,
&
list
,
&
colors
=
existingTagColors
,
&
existingTagColors
](
QListWidgetItem
*
item
)
{
Fun
editItem
=
[
&
d
,
&
list
,
&
colors
=
existingTagColors
,
&
existingTagColors
]()
{
QListWidgetItem
*
item
=
list
.
currentItem
();
if
(
!
item
)
{
return
false
;
}
// Edit an existing tag
QDialog
d2
(
&
d
);
d2
.
setWindowTitle
(
i18n
(
"Edit Tag"
));
...
...
@@ -248,7 +252,12 @@ void TagWidget::showTagsConfig()
existingTagColors
.
removeAll
(
originalColor
);
existingTagColors
<<
cb
.
color
();
}
});
return
true
;
};
// set the editable triggers for the list widget
QAction
*
a
=
KStandardAction
::
renameFile
(
this
,
editItem
,
&
d
);
list
.
addAction
(
a
);
d
.
connect
(
&
list
,
&
QListWidget
::
itemDoubleClicked
,
&
d
,
[
=
]()
{
editItem
();
});
QToolButton
*
tb
=
new
QToolButton
(
&
d
);
tb
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"edit-delete"
)));
lay
->
addWidget
(
tb
);
...
...
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