mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-12 14:47:44 +02:00
2021-01-15 Fred Gleason <fredg@paravelsystems.com>
* Modified the 'RDLibraryModel::addCart()' to return 'QModelIndex' rather than 'int'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
aa41ce2f84
commit
42e1358386
@ -20791,3 +20791,6 @@
|
|||||||
2021-01-14 Fred Gleason <fredg@paravelsystems.com>
|
2021-01-14 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a bug in rdlibrary(1) that caused a SQL error to be generated
|
* Fixed a bug in rdlibrary(1) that caused a SQL error to be generated
|
||||||
when neither audio nor macro carts were selected in the cart filter.
|
when neither audio nor macro carts were selected in the cart filter.
|
||||||
|
2021-01-15 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Modified the 'RDLibraryModel::addCart()' to return 'QModelIndex'
|
||||||
|
rather than 'int'.
|
||||||
|
@ -334,7 +334,7 @@ QString RDLibraryModel::cartOwnedBy(const QModelIndex &index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int RDLibraryModel::addCart(unsigned cartnum)
|
QModelIndex RDLibraryModel::addCart(unsigned cartnum)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Find the insertion offset
|
// Find the insertion offset
|
||||||
@ -372,7 +372,7 @@ int RDLibraryModel::addCart(unsigned cartnum)
|
|||||||
endInsertRows();
|
endInsertRows();
|
||||||
emit rowCountChanged(d_texts.size());
|
emit rowCountChanged(d_texts.size());
|
||||||
|
|
||||||
return offset;
|
return createIndex(offset,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class RDLibraryModel : public QAbstractItemModel
|
|||||||
RDCart::Type cartType(const QModelIndex &index) const;
|
RDCart::Type cartType(const QModelIndex &index) const;
|
||||||
QString cutName(const QModelIndex &index) const;
|
QString cutName(const QModelIndex &index) const;
|
||||||
QString cartOwnedBy(const QModelIndex &index);
|
QString cartOwnedBy(const QModelIndex &index);
|
||||||
int addCart(unsigned cartnum);
|
QModelIndex addCart(unsigned cartnum);
|
||||||
void removeCart(unsigned cartnum);
|
void removeCart(unsigned cartnum);
|
||||||
void refreshRow(const QModelIndex &index);
|
void refreshRow(const QModelIndex &index);
|
||||||
void refreshCart(unsigned cartnum);
|
void refreshCart(unsigned cartnum);
|
||||||
|
@ -377,8 +377,8 @@ void MainWidget::addData()
|
|||||||
EditCart *cart=
|
EditCart *cart=
|
||||||
new EditCart(cartnums,&lib_import_path,true,profile_ripping,this);
|
new EditCart(cartnums,&lib_import_path,true,profile_ripping,this);
|
||||||
if(cart->exec()) {
|
if(cart->exec()) {
|
||||||
int row=lib_cart_model->addCart(cart_num);
|
QModelIndex row=lib_cart_model->addCart(cart_num);
|
||||||
lib_cart_view->scrollTo(lib_cart_model->index(row,0));
|
SelectRow(row);
|
||||||
SendNotification(RDNotification::AddAction,cart_num);
|
SendNotification(RDNotification::AddAction,cart_num);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user