Commit f61b5d4b authored by Till Theato's avatar Till Theato
Browse files

Fix resize box in geometry widget

svn path=/trunk/kdenlive/; revision=4733
parent 45e2f75e
......@@ -372,9 +372,9 @@ void GeometryWidget::slotUpdateProperties()
QPointF rectPos = m_rect->pos();
int size;
if (rectSize.width() / m_monitor->render->dar() < rectSize.height())
size = (int)(rectSize.width() * 100 / m_monitor->render->renderWidth());
size = (int)((rectSize.width() * 100.0 / m_monitor->render->renderWidth()) + 0.5);
else
size = (int)(rectSize.height() * 100 / m_monitor->render->renderHeight());
size = (int)((rectSize.height() * 100.0 / m_monitor->render->renderHeight()) + 0.5);
m_ui.spinX->blockSignals(true);
m_ui.spinY->blockSignals(true);
......@@ -423,7 +423,9 @@ void GeometryWidget::slotSetHeight(int value)
void GeometryWidget::slotResize(int value)
{
m_rect->setRect(0, 0, m_monitor->render->renderWidth() * value / 100, m_monitor->render->renderHeight() * value / 100);
m_rect->setRect(0, 0,
(int)((m_monitor->render->renderWidth() * value / 100.0) + 0.5),
(int)((m_monitor->render->renderHeight() * value / 100.0) + 0.5));
slotUpdateGeometry();
}
......
......@@ -112,7 +112,7 @@ bool MonitorScene::getDirectUpdate()
return m_directUpdate;
}
void MonitorScene::slotSetBackgroundImage(QImage image)
void MonitorScene::slotSetBackgroundImage(const QImage &image)
{
m_backgroundImage = image;
slotUpdateBackground();
......
......@@ -48,7 +48,7 @@ public slots:
void slotSetDirectUpdate(bool directUpdate);
private slots:
void slotSetBackgroundImage(QImage image);
void slotSetBackgroundImage(const QImage &image);
private:
resizeModes getResizeMode(QGraphicsRectItem *item, QPoint pos);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment