mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-01 10:56:15 -05: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
@ -98,9 +98,6 @@ void DetailsDialog::closeEvent (QCloseEvent * event)
|
|||||||
{
|
{
|
||||||
QWidget::closeEvent(event);
|
QWidget::closeEvent(event);
|
||||||
|
|
||||||
int c;
|
|
||||||
c = CommentsModel->rowCount();
|
|
||||||
CommentsModel->removeRows(0,c);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetailsDialog::setFileName(const QString & filename)
|
void DetailsDialog::setFileName(const QString & filename)
|
||||||
@ -108,6 +105,10 @@ void DetailsDialog::setFileName(const QString & filename)
|
|||||||
int c;
|
int c;
|
||||||
QModelIndex index;
|
QModelIndex index;
|
||||||
|
|
||||||
|
c = CommentsModel->rowCount();
|
||||||
|
CommentsModel->removeRows(0,c);
|
||||||
|
|
||||||
|
{
|
||||||
c = CommentsModel->rowCount();
|
c = CommentsModel->rowCount();
|
||||||
CommentsModel->insertRow(c);
|
CommentsModel->insertRow(c);
|
||||||
|
|
||||||
@ -119,6 +120,7 @@ void DetailsDialog::setFileName(const QString & filename)
|
|||||||
|
|
||||||
index = CommentsModel->index(c, 2);
|
index = CommentsModel->index(c, 2);
|
||||||
CommentsModel->setData(index, filename);
|
CommentsModel->setData(index, filename);
|
||||||
|
}
|
||||||
|
|
||||||
ui.name_label_2->setText(filename);
|
ui.name_label_2->setText(filename);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user