mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 05:38:51 -04:00
fixed resizing of items when resizing the item list
This commit is contained in:
parent
01683aac4e
commit
a6a3bd3f0f
3 changed files with 10 additions and 0 deletions
|
@ -292,7 +292,9 @@ void PostedListWidgetWithModel::updateSorting(int s)
|
||||||
|
|
||||||
void PostedListWidgetWithModel::handlePostsTreeSizeChange(QSize size)
|
void PostedListWidgetWithModel::handlePostsTreeSizeChange(QSize size)
|
||||||
{
|
{
|
||||||
|
std::cerr << "resizing!"<< std::endl;
|
||||||
mPostedPostsDelegate->setCellWidth(size.width());
|
mPostedPostsDelegate->setCellWidth(size.width());
|
||||||
|
mPostedPostsModel->triggerRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PostedListWidgetWithModel::filterItems(QString text)
|
void PostedListWidgetWithModel::filterItems(QString text)
|
||||||
|
|
|
@ -143,6 +143,11 @@ void RsPostedPostsModel::update()
|
||||||
{
|
{
|
||||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mDisplayedNbPosts,0,(void*)NULL));
|
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)
|
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.
|
// Triggers a preMod, begin/end remove rows and data update. Could be useful if update is not enough to reset cell sizes.
|
||||||
void deepUpdate();
|
void deepUpdate();
|
||||||
|
|
||||||
|
// same without data update, which is far less costly
|
||||||
|
void triggerRedraw();
|
||||||
|
|
||||||
#ifdef TODO
|
#ifdef TODO
|
||||||
void setSortMode(SortMode mode) ;
|
void setSortMode(SortMode mode) ;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue