mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-21 12:54:26 -04:00
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:
parent
238b2773bf
commit
6f176c620b
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue