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
b5520d41
Commit
b5520d41
authored
Jun 01, 2020
by
Jean-Baptiste Mardelle
Browse files
When resizing a geometry effect, like transform, keep item centered
parent
4652d902
Pipeline
#22037
passed with stage
in 22 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/widgets/geometrywidget.cpp
View file @
b5520d41
...
...
@@ -241,14 +241,18 @@ void GeometryWidget::slotFitToHeight()
}
void
GeometryWidget
::
slotResize
(
double
value
)
{
m_spinWidth
->
blockSignals
(
true
);
m_spinHeight
->
blockSignals
(
true
);
int
w
=
m_originalSize
->
isChecked
()
?
m_sourceSize
.
width
()
:
m_defaultSize
.
width
();
int
h
=
m_originalSize
->
isChecked
()
?
m_sourceSize
.
height
()
:
m_defaultSize
.
height
();
m_spinWidth
->
setValue
(
w
*
value
/
100.0
);
m_spinHeight
->
setValue
(
h
*
value
/
100.0
);
m_spinWidth
->
blockSignals
(
false
);
m_spinHeight
->
blockSignals
(
false
);
QSignalBlocker
bkh
(
m_spinHeight
);
QSignalBlocker
bkw
(
m_spinWidth
);
QSignalBlocker
bkx
(
m_spinX
);
QSignalBlocker
bky
(
m_spinY
);
int
w
=
(
m_originalSize
->
isChecked
()
?
m_sourceSize
.
width
()
:
m_defaultSize
.
width
())
*
value
/
100.0
;
int
h
=
(
m_originalSize
->
isChecked
()
?
m_sourceSize
.
height
()
:
m_defaultSize
.
height
())
*
value
/
100.0
;
int
delta_x
=
(
m_spinWidth
->
value
()
-
w
)
/
2
;
int
delta_y
=
(
m_spinHeight
->
value
()
-
h
)
/
2
;
m_spinWidth
->
setValue
(
w
);
m_spinHeight
->
setValue
(
h
);
m_spinX
->
setValue
(
m_spinX
->
value
()
+
delta_x
);
m_spinY
->
setValue
(
m_spinY
->
value
()
+
delta_y
);
slotAdjustRectKeyframeValue
();
}
...
...
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