fixed bug in files model

This commit is contained in:
csoler 2020-06-10 20:08:23 +02:00
parent cbf4ce6670
commit 85ce2c0f33
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
2 changed files with 3 additions and 1 deletions

View File

@ -84,7 +84,7 @@ int RsGxsChannelPostFilesModel::rowCount(const QModelIndex& parent) const
return 0; return 0;
if(!parent.isValid()) if(!parent.isValid())
return (mFiles.size() + COLUMN_FILES_NB_COLUMNS-1)/COLUMN_FILES_NB_COLUMNS; // mFilteredPosts always has an item at 0, so size()>=1, and mColumn>=1 return mFiles.size(); // mFilteredPosts always has an item at 0, so size()>=1, and mColumn>=1
RsErr() << __PRETTY_FUNCTION__ << " rowCount cannot figure out the porper number of rows." << std::endl; RsErr() << __PRETTY_FUNCTION__ << " rowCount cannot figure out the porper number of rows." << std::endl;
return 0; return 0;

View File

@ -139,6 +139,8 @@ private slots:
void settingsChanged(); void settingsChanged();
void handlePostsTreeSizeChange(QSize s); void handlePostsTreeSizeChange(QSize s);
void updateChannelFiles(); void updateChannelFiles();
public slots:
void sortColumn(int col,Qt::SortOrder so); void sortColumn(int col,Qt::SortOrder so);
private: private: