From 85ce2c0f33aba78fc9b1c3ba51a657eb4492b691 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 10 Jun 2020 20:08:23 +0200 Subject: [PATCH] fixed bug in files model --- retroshare-gui/src/gui/gxschannels/GxsChannelPostFilesModel.cpp | 2 +- .../src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostFilesModel.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelPostFilesModel.cpp index 8942b65b0..7a5ae4a34 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostFilesModel.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostFilesModel.cpp @@ -84,7 +84,7 @@ int RsGxsChannelPostFilesModel::rowCount(const QModelIndex& parent) const return 0; 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; return 0; diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h index 375290f61..b5d8c289d 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h @@ -139,6 +139,8 @@ private slots: void settingsChanged(); void handlePostsTreeSizeChange(QSize s); void updateChannelFiles(); + +public slots: void sortColumn(int col,Qt::SortOrder so); private: