Start rendering on return pressed: http://kdenlive.org/mantis/view.php?id=2757

parent d55b20cc
......@@ -584,7 +584,7 @@
</entry>
<entry name="dragvalue_directupdate" type="Bool">
<label>...</label>
<default>false</default>
<default>true</default>
</entry>
</group>
......
......@@ -276,6 +276,7 @@ RenderWidget::RenderWidget(const QString &projectfolder, bool enableProxy, MltVi
m_view.splitter->setStretchFactor(0, 2);
m_view.out_file->setMode(KFile::File);
m_view.out_file->setFocusPolicy(Qt::ClickFocus);
m_view.running_jobs->setHeaderLabels(QStringList() << QString() << i18n("File"));
m_jobsDelegate = new RenderViewDelegate(this);
......@@ -1108,7 +1109,7 @@ void RenderWidget::checkRenderStatus()
item = static_cast<RenderJobItem*> (m_view.running_jobs->topLevelItem(0));
bool waitingJob = false;
// Find first aiting job
// Find first waiting job
while (item) {
if (item->status() == WAITINGJOB) {
item->setData(1, TimeRole, QTime::currentTime());
......@@ -2228,3 +2229,20 @@ void RenderWidget::setRescaleEnabled(bool enable)
}
}
void RenderWidget::keyPressEvent(QKeyEvent *e) {
if(e->key()==Qt::Key_Return || e->key()==Qt::Key_Enter) {
switch (m_view.tabWidget->currentIndex()) {
case 1:
if (m_view.start_job->isEnabled()) slotStartCurrentJob();
break;
case 2:
if (m_view.start_script->isEnabled()) slotStartScript();
break;
default:
if (m_view.buttonRender->isEnabled()) slotPrepareExport();
break;
}
}
else QDialog::keyPressEvent(e);
}
......@@ -29,6 +29,7 @@
#include <QPushButton>
#include <QPainter>
#include <QStyledItemDelegate>
#include <QKeyEvent>
#include "definitions.h"
#include "ui_renderwidget_ui.h"
......@@ -138,6 +139,7 @@ public:
protected:
virtual QSize sizeHint() const;
virtual void keyPressEvent(QKeyEvent *e);
public slots:
void slotExport(bool scriptExport, int zoneIn, int zoneOut, const QMap <QString, QString> metadata, const QString &playlistPath, const QString &scriptPath, bool exportAudio);
......
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