fixed remove rows before adding new

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1981 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-01-06 23:03:54 +00:00
parent 238b2773bf
commit 6f176c620b

View File

@ -98,9 +98,6 @@ void DetailsDialog::closeEvent (QCloseEvent * event)
{
QWidget::closeEvent(event);
int c;
c = CommentsModel->rowCount();
CommentsModel->removeRows(0,c);
}
void DetailsDialog::setFileName(const QString & filename)
@ -108,6 +105,10 @@ void DetailsDialog::setFileName(const QString & filename)
int c;
QModelIndex index;
c = CommentsModel->rowCount();
CommentsModel->removeRows(0,c);
{
c = CommentsModel->rowCount();
CommentsModel->insertRow(c);
@ -119,6 +120,7 @@ void DetailsDialog::setFileName(const QString & filename)
index = CommentsModel->index(c, 2);
CommentsModel->setData(index, filename);
}
ui.name_label_2->setText(filename);