@@ -258,10 +258,21 @@ void MainWindow::on_actionCut_triggered()
258258 // Create a new dialog and run the actual cutting in a different thread.
259259
260260 CuttingDialog* cuttingDlg = new CuttingDialog (this );
261- cuttingDlg->startCut (paths, mediaSize.width (), mediaSize.height (), cutDialog->media (), cutDialog->speed (),
262- cutDialog->pressure (), cutDialog->trackEnhancing (),
263- cutDialog->regMark (), cutDialog->regSearch (),
264- cutDialog->regWidth (), cutDialog->regHeight ());
261+
262+ CutParams params;
263+ params.cuts = paths;
264+ params.mediawidth = mediaSize.width ();
265+ params.mediaheight = mediaSize.height ();
266+ params.media = cutDialog->media ();
267+ params.pressure = cutDialog->pressure ();
268+ params.regwidth = cutDialog->regWidth ();
269+ params.regheight = cutDialog->regHeight ();
270+ params.regmark = cutDialog->regMark ();
271+ params.regsearch = cutDialog->regSearch ();
272+ params.speed = cutDialog->speed ();
273+ params.trackenhancing = cutDialog->trackEnhancing ();
274+
275+ cuttingDlg->startCut (params);
265276 cuttingDlg->show ();
266277}
267278
@@ -382,6 +393,7 @@ void MainWindow::setFileLoaded(QString filename)
382393 ui->actionZoom_In ->setEnabled (e);
383394 ui->actionZoom_Out ->setEnabled (e);
384395 ui->actionCut ->setEnabled (e);
396+ ui->actionReload ->setEnabled (e);
385397
386398}
387399
@@ -391,9 +403,18 @@ bool MainWindow::eventFilter(QObject *o, QEvent *e)
391403 {
392404 if (e->type () == QEvent::Wheel)
393405 {
406+ // Anchor under the mouse pointer when using the mouse wheel.
407+ // This doesn't quite work as nicely as I'd like because it clamps the scrolling
408+ // precisely to the scene boundary. It's a bit hard to zoom to corners. Oh well.
409+ ui->graphicsView ->setTransformationAnchor (QGraphicsView::AnchorUnderMouse);
394410 QWheelEvent *w = dynamic_cast <QWheelEvent*>(e);
395- if (w->delta () <= 0 ) on_actionZoom_In_triggered ();
396- else on_actionZoom_Out_triggered ();
411+ if (w->delta () <= 0 )
412+ on_actionZoom_Out_triggered ();
413+ else
414+ on_actionZoom_In_triggered ();
415+
416+ // Anchor in view centre for keyboard shortcuts.
417+ ui->graphicsView ->setTransformationAnchor (QGraphicsView::AnchorViewCenter);
397418 return true ;
398419 }
399420 }
0 commit comments