mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed resizing of items when resizing the item list
This commit is contained in:
parent
01683aac4e
commit
a6a3bd3f0f
@ -292,7 +292,9 @@ void PostedListWidgetWithModel::updateSorting(int s)
|
||||
|
||||
void PostedListWidgetWithModel::handlePostsTreeSizeChange(QSize size)
|
||||
{
|
||||
std::cerr << "resizing!"<< std::endl;
|
||||
mPostedPostsDelegate->setCellWidth(size.width());
|
||||
mPostedPostsModel->triggerRedraw();
|
||||
}
|
||||
|
||||
void PostedListWidgetWithModel::filterItems(QString text)
|
||||
|
@ -143,6 +143,11 @@ void RsPostedPostsModel::update()
|
||||
{
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mDisplayedNbPosts,0,(void*)NULL));
|
||||
}
|
||||
void RsPostedPostsModel::triggerRedraw()
|
||||
{
|
||||
preMods();
|
||||
postMods();
|
||||
}
|
||||
|
||||
void RsPostedPostsModel::setFilter(const QStringList& strings, uint32_t& count)
|
||||
{
|
||||
|
@ -141,6 +141,9 @@ public:
|
||||
// Triggers a preMod, begin/end remove rows and data update. Could be useful if update is not enough to reset cell sizes.
|
||||
void deepUpdate();
|
||||
|
||||
// same without data update, which is far less costly
|
||||
void triggerRedraw();
|
||||
|
||||
#ifdef TODO
|
||||
void setSortMode(SortMode mode) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user