mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 16:45:11 -04:00
fixed core dump in printout of empty slots. Improved dir sync-ing strategy
This commit is contained in:
parent
e985a2c927
commit
ddc89a6535
3 changed files with 35 additions and 19 deletions
|
@ -163,10 +163,10 @@ SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareD
|
|||
QHeaderView * header = ui.dirTreeView->header () ;
|
||||
|
||||
header->resizeSection ( COLUMN_NAME, 490 );
|
||||
header->resizeSection ( COLUMN_SIZE, 70 );
|
||||
header->resizeSection ( COLUMN_AGE, 100 );
|
||||
header->resizeSection ( COLUMN_FRIEND, 100 );
|
||||
header->resizeSection ( COLUMN_DIR, 100 );
|
||||
header->resizeSection ( COLUMN_SIZE, 70 );
|
||||
header->resizeSection ( COLUMN_AGE, 100 );
|
||||
header->resizeSection ( COLUMN_FRIEND,100);
|
||||
header->resizeSection ( COLUMN_DIR, 100 );
|
||||
|
||||
header->setStretchLastSection(false);
|
||||
|
||||
|
@ -869,6 +869,10 @@ void SharedFilesDialog::restoreExpandedPaths(const std::set<std::string>& expand
|
|||
if(ui.dirTreeView->model() == NULL)
|
||||
return ;
|
||||
|
||||
// we need to disable this, because the signal will trigger unnecessary update at the friend.
|
||||
|
||||
ui.dirTreeView->blockSignals(true) ;
|
||||
|
||||
#ifdef DEBUG_SHARED_FILES_DIALOG
|
||||
std::cerr << "Restoring expanded items. " << std::endl;
|
||||
#endif
|
||||
|
@ -877,6 +881,7 @@ void SharedFilesDialog::restoreExpandedPaths(const std::set<std::string>& expand
|
|||
std::string path = ui.dirTreeView->model()->index(row,0).data(Qt::DisplayRole).toString().toStdString();
|
||||
recursRestoreExpandedItems(ui.dirTreeView->model()->index(row,0),path,expanded_indexes);
|
||||
}
|
||||
ui.dirTreeView->blockSignals(false) ;
|
||||
}
|
||||
|
||||
void SharedFilesDialog::recursSaveExpandedItems(const QModelIndex& index,const std::string& path,std::set<std::string>& exp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue