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
04c4a1ce
Commit
04c4a1ce
authored
Feb 17, 2021
by
Julius Künzel
Browse files
Keep title text item editable if even if it is empty
(cherry picked from commit
7f303be5
)
parent
f6b3e27f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/titler/graphicsscenerectmove.cpp
View file @
04c4a1ce
...
...
@@ -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
());
...
...
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