X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftitlewidget.cpp;h=e8184fabeb26483e94abadafd73bd80825bd9ae8;hb=de93dc84bc5f050272e4e736c3afa6ad5f3c6654;hp=64272842d2691239375264db0a2d778b4a5716c3;hpb=31198f867035d561ebe99b04b85975eaac58302c;p=kdenlive diff --git a/src/titlewidget.cpp b/src/titlewidget.cpp index 64272842..e8184fab 100644 --- a/src/titlewidget.cpp +++ b/src/titlewidget.cpp @@ -503,8 +503,9 @@ TitleWidget::TitleWidget(const KUrl &url, const Timecode &tc, const QString &pro // scale the view so that the title widget is not too big at startup graphicsView->scale(.5, .5); - if (!url.isEmpty()) loadTitle(url); - else { + if (!url.isEmpty()) { + loadTitle(url); + } else { prepareTools(NULL); slotTextTool(); QTimer::singleShot(200, this, SLOT(slotAdjustZoom())); @@ -645,7 +646,8 @@ void TitleWidget::templateIndexChanged(int index) QString item = templateBox->itemData(index).toString(); if (!item.isEmpty()) { if (lastDocumentHash != QCryptographicHash::hash(xml().toString().toAscii(), QCryptographicHash::Md5).toHex()) { - if (KMessageBox::questionYesNo(this, i18n("Do you really want to load a new template? Changes in this title will be lost!")) == KMessageBox::No) return; + if (KMessageBox::questionYesNo(this, i18n("Do you really want to load a new template? Changes in this title will be lost!")) == KMessageBox::No) + return; } loadTitle(item); @@ -1081,10 +1083,7 @@ void TitleWidget::selectionChanged() zUp->setEnabled(false); zDown->setEnabled(false); } - - } - } void TitleWidget::slotValueChanged(int type) @@ -1621,8 +1620,7 @@ void TitleWidget::slotUpdateText() void TitleWidget::rectChanged() { QList l = graphicsView->scene()->selectedItems(); - int i; - for (i = 0; i < l.length(); ++i) { + for (int i = 0; i < l.length(); ++i) { if (l.at(i)->type() == RECTITEM && !settingUp) { QGraphicsRectItem *rec = static_cast(l.at(i)); QColor f = rectFColor->color(); @@ -1881,8 +1879,9 @@ void TitleWidget::saveTitle(KUrl url) fs->setMode(KFile::File); fs->setConfirmOverwrite(true); fs->setKeepLocation(true); - fs->exec(); - if (fs) url = fs->selectedUrl(); + if (fs->exec()) { + url = fs->selectedUrl(); + } delete fs; } if (!url.isEmpty()) {