~ubuntu-branches/debian/sid/chessx/sid

« back to all changes in this revision

Viewing changes to src/gui/databaselist.cpp

  • Committer: Package Import Robot
  • Author(s): Niklas Fiekas
  • Date: 2014-10-06 18:26:02 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20141006182602-4kpiyz31knghkbrq
Tags: 1.2.2-1
* New upstream release.
  - Fix crash and data loss when trying to save a database other than the
    currently selected one.
  - Exclude autogenerated files from source tarball; fixes lintian warning
    source-contains-autogenerated-visual-c++-file.
  - Remove debian/patches/desktop-file.patch; applied upstream.
  - Remove debian/patches/desktop-mime-but-no-exec-code.patch; applied
    upstream.
* debian/chessx.6:
  - Adjust tagline in manpage.
* debian/rules:
  - Remove duplicate QT_SELECT=5.
* debian/control:
  - Update standards version to 3.9.6.0; no relevant changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
332
332
    if(gameMimeData)
333
333
    {
334
334
        QModelIndex index = indexAt(event->pos());
335
 
        appendGameToDataBase(index, gameMimeData->m_index);
 
335
        appendGameToDataBase(index, gameMimeData->m_indexList);
336
336
    }
337
337
    else if(dbMimeData)
338
338
    {
359
359
    event->acceptProposedAction();
360
360
}
361
361
 
362
 
void DatabaseList::appendGameToDataBase(QModelIndex index, int gameIndex)
 
362
void DatabaseList::appendGameToDataBase(QModelIndex index, QList<int> gameIndexList)
363
363
{
364
364
    // Make sure the drop occured on a cell!
365
365
    if(index.isValid())
366
366
    {
367
 
        QString path = m_filterModel->data(m_filterModel->index(index.row(), DBLV_PATH)).toString();
368
 
        emit requestAppendGame(path, gameIndex);
 
367
        foreach(int gameIndex, gameIndexList)
 
368
        {
 
369
            QString path = m_filterModel->data(m_filterModel->index(index.row(), DBLV_PATH)).toString();
 
370
            emit requestAppendGame(path, gameIndex);
 
371
        }
369
372
    }
370
373
}
371
374