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
7f303be5
Commit
7f303be5
authored
Feb 17, 2021
by
Julius Künzel
⚠
Browse files
Keep title text item editable if even if it is empty
parent
1e02108e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/titler/graphicsscenerectmove.cpp
View file @
7f303be5
...
...
@@ -209,6 +209,7 @@ void MyTextItem::updateGeometry(int, int, int)
void
MyTextItem
::
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
w
)
{
if
((
textInteractionFlags
()
&
static_cast
<
int
>
((
Qt
::
TextEditable
)
!=
0
))
!=
0
)
{
document
()
->
setDocumentMargin
(
0
);
QGraphicsTextItem
::
paint
(
painter
,
option
,
w
);
}
else
{
painter
->
setRenderHint
(
QPainter
::
Antialiasing
);
...
...
@@ -231,8 +232,9 @@ void MyTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option
pen
.
setWidthF
(
outline
);
painter
->
strokePath
(
m_path
,
pen
);
}
if
(
isSelected
())
{
QPen
pen
(
Qt
::
red
);
document
()
->
setDocumentMargin
(
toPlainText
().
isEmpty
()
?
6
:
0
);
if
(
isSelected
()
||
toPlainText
().
isEmpty
())
{
QPen
pen
(
isSelected
()
?
Qt
::
red
:
Qt
::
blue
);
pen
.
setStyle
(
Qt
::
DashLine
);
painter
->
setPen
(
pen
);
painter
->
drawRect
(
boundingRect
());
...
...
Julius Künzel
⚠
@jlskuz
mentioned in commit
04c4a1ce
·
Feb 17, 2021
mentioned in commit
04c4a1ce
mentioned in commit 04c4a1ce8efa314a9067454bb40e4fe0e5bcc80c
Toggle commit list
Write
Preview
Supports
Markdown
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