From d9d32f44d64834754650fc4fe70a4d7aae449e0c Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 9 Jul 2010 21:07:10 +0200 Subject: Final version of NewMovieWizard::accept() (hopefully) Actually made this function work. Forgot to handle actors and genres. Also several bugfixes in other parts: -fix typo in FilesTreeModel query -commit changes ind MappingTableModel::addItem, making the genre and actor widgets work as intended -remove redundant MappingTableModel::find(), already implemented in SmTreeModel -call next() instead of exec() in SeriesTreeModel::addSeriesPart. Query is already executing if it's a select -use QModelIndex::row() instead of column() in MappingTableWidget::removeItem() -add partNo to layout in MovieInfopage::MovieInfoPage() -add convenience function setMappings() to MappingTableModel --- mappingtablewidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mappingtablewidget.cpp') diff --git a/mappingtablewidget.cpp b/mappingtablewidget.cpp index e4a177c..a96ff1d 100644 --- a/mappingtablewidget.cpp +++ b/mappingtablewidget.cpp @@ -94,6 +94,7 @@ void MappingTableWidget::addItem(){ mMappingModel->addMapping(mCurrentId, id); } } + mItemEdit->clear(); } void MappingTableWidget::removeItem(){ @@ -103,7 +104,7 @@ void MappingTableWidget::removeItem(){ } foreach(QPersistentModelIndex i, selected){ QString item = i.data().toString(); - mModel->removeRows(i.column(), 1); + mModel->removeRows(i.row(), 1); QModelIndex itemIdx = mMappingModel->find(item); if(itemIdx.isValid()){ mMappingModel->removeMapping(mCurrentId, itemIdx.data(MappingTableModel::ItemIdRole).toInt()); -- cgit v1.2.3-70-g09d2