fixed disabling of channel post comment box on resize and comment

This commit is contained in:
csoler 2020-10-21 22:07:45 +02:00
parent 9d4042c401
commit f1d98913d1
3 changed files with 26 additions and 10 deletions

View file

@ -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