All pastes #507975 Raw Edit

Untitled

public text v1 · immutable
·published 2007-05-24 20:30 UTC
rendered paste body
void MainWindow::Window::launchViewer( QStringList files, bool reuse, bool slideShow, bool random )
{
    int seek = -1;
    if ( files.count() == 0 ) {
        QMessageBox::warning( MainWindow::Window::theMainWindow(), i18n("No Images or Videos to Display"),
                              i18n("None of the selected images or videos were available on disk.") );
        return;
<<<<<<< .mine
    } else if ( files.count() == 1 ) {
        // we fake it so it appears the user has selected all images
        // and magically scrolls to the originally selected one
        QString fileName = files.first();
        files = DB::ImageDB::instance()->currentScope(  true );
        int index = 0;

        for( QStringList::Iterator it = files.begin(); it != files.end(); ++it, ++index ) {
            if ( *it == fileName ) {
                seek = index;
                break;
            }
        }

=======
    } else if ( files.count() == 1 ) {
        // we fake it so it appears the user has selected all images
        // and magically scrolls to the originally selected one
        const QString fileName = ((const QStringList&)files).first();
        files = DB::ImageDB::instance()->currentScope(  true );
        seek = files.findIndex(fileName);
>>>>>>> .r666225
    }