]> git.sesse.net Git - kdenlive/blobdiff - src/geometryval.cpp
const modifiers are useless on integral return types [PATCH by Ray Lehtiniemi]
[kdenlive] / src / geometryval.cpp
index 2c40d6e098e651b1b95b8a045ab0a495ecc215fa..62584209f6b4f1130d83eb77df2939a07cfb4c34 100644 (file)
  *                                                                         *
  ***************************************************************************/
 
+#include "geometryval.h"
+#include "graphicsscenerectmove.h"
+#include "kdenlivesettings.h"
 
+#include <KDebug>
 
 #include <QGraphicsView>
 #include <QVBoxLayout>
-#include <QGraphicsScene>
 #include <QGraphicsRectItem>
-#include <QMouseEvent>
 #include <QMenu>
 
-#include <KDebug>
-
-#include "graphicsscenerectmove.h"
-#include "geometryval.h"
-#include "kdenlivesettings.h"
 
 Geometryval::Geometryval(const MltVideoProfile profile, QWidget* parent): QWidget(parent), m_profile(profile), m_geom(NULL), m_path(NULL), paramRect(NULL), m_fixedMode(false) {
     ui.setupUi(this);
@@ -48,7 +45,6 @@ Geometryval::Geometryval(const MltVideoProfile profile, QWidget* parent): QWidge
     scene = new GraphicsSceneRectMove(this);
     scene->setTool(TITLE_SELECT);
     view->setScene(scene);
-    double aspect = (double) profile.sample_aspect_num / profile.sample_aspect_den * profile.width / profile.height;
     QGraphicsRectItem *m_frameBorder = new QGraphicsRectItem(QRectF(0, 0, profile.width, profile.height));
     m_frameBorder->setZValue(-1100);
     m_frameBorder->setBrush(QColor(255, 255, 0, 30));
@@ -96,7 +92,7 @@ Geometryval::Geometryval(const MltVideoProfile profile, QWidget* parent): QWidge
     //view->fitInView(m_frameBorder, Qt::KeepAspectRatio);
     const double sc = 100.0 / profile.height * 0.8;
     QRectF srect = view->sceneRect();
-    view->setSceneRect(srect.x(), -srect.height() / 3, srect.width(), srect.height() + srect.height() / 3 * 2);
+    view->setSceneRect(srect.x(), -srect.height() / 3 + 10, srect.width(), srect.height() + srect.height() / 3 * 2 - 10);
     scene->setZoom(sc);
     view->centerOn(m_frameBorder);
     connect(ui.buttonNext , SIGNAL(clicked()) , this , SLOT(slotNextFrame()));
@@ -290,6 +286,9 @@ void Geometryval::slotDeleteFrame() {
     m_scaleMenu->setEnabled(false);
     m_alignMenu->setEnabled(false);
     m_helper->update();
+    slotPositionChanged(pos, false);
+    updateTransitionPath();
+    emit parameterChanged();
 }
 
 void Geometryval::slotAddFrame() {
@@ -309,6 +308,7 @@ void Geometryval::slotAddFrame() {
     m_scaleMenu->setEnabled(true);
     m_alignMenu->setEnabled(true);
     m_helper->update();
+    emit parameterChanged();
 }
 
 void Geometryval::slotNextFrame() {