mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 15:30:31 -04:00
fixed disabling of channel post comment box on resize and comment
This commit is contained in:
parent
9d4042c401
commit
f1d98913d1
3 changed files with 26 additions and 10 deletions
|
@ -319,13 +319,16 @@ Qt::ItemFlags RsGxsChannelPostsModel::flags(const QModelIndex& index) const
|
|||
return QAbstractItemModel::flags(index);
|
||||
}
|
||||
|
||||
void RsGxsChannelPostsModel::setNumColumns(int n)
|
||||
bool RsGxsChannelPostsModel::setNumColumns(int n)
|
||||
{
|
||||
if(n < 1)
|
||||
{
|
||||
RsErr() << __PRETTY_FUNCTION__ << " Attempt to set a number of column of 0. This is wrong." << std::endl;
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if(mColumns == n)
|
||||
return false;
|
||||
|
||||
preMods();
|
||||
|
||||
beginRemoveRows(QModelIndex(),0,rowCount()-1);
|
||||
|
@ -337,6 +340,8 @@ void RsGxsChannelPostsModel::setNumColumns(int n)
|
|||
endInsertRows();
|
||||
|
||||
postMods();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
quintptr RsGxsChannelPostsModel::getChildRef(quintptr ref,int index) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue