From c141eae8289a9e93a02158005f832c696268613e Mon Sep 17 00:00:00 2001 From: Phenom Date: Thu, 22 Feb 2018 18:54:14 +0100 Subject: [PATCH] Fix SharedFilesDialog show old hidden column. --- .../gui/FileTransfer/SharedFilesDialog.cpp | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp index 652337b50..88c925882 100644 --- a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp @@ -229,6 +229,12 @@ LocalSharedFilesDialog::LocalSharedFilesDialog(QWidget *parent) // load settings processSettings(true); + // Force to show columns even if hidden in setting + ui.dirTreeView->setColumnHidden(COLUMN_NAME, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_FILENB, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_SIZE, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_AGE, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_FRIEND_ACCESS, false) ; // Setup the current view model. // changeCurrentViewModel(ui.viewType_CB->currentIndex()) ; @@ -254,11 +260,16 @@ RemoteSharedFilesDialog::RemoteSharedFilesDialog(QWidget *parent) ui.checkButton->hide() ; connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(downloadRemoteSelected())); - connect(ui.dirTreeView, SIGNAL( expanded(const QModelIndex & ) ), this, SLOT( expanded(const QModelIndex & ) ) ); - connect(ui.dirTreeView, SIGNAL( doubleClicked(const QModelIndex & ) ), this, SLOT( expanded(const QModelIndex & ) ) ); + connect(ui.dirTreeView, SIGNAL( expanded(const QModelIndex & ) ), this, SLOT( expanded(const QModelIndex & ) ) ); + connect(ui.dirTreeView, SIGNAL( doubleClicked(const QModelIndex & ) ), this, SLOT( expanded(const QModelIndex & ) ) ); // load settings processSettings(true); + // Force to show columns even if hidden in setting + ui.dirTreeView->setColumnHidden(COLUMN_NAME, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_FILENB, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_SIZE, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_AGE, false) ; // Setup the current view model. // changeCurrentViewModel(ui.viewType_CB->currentIndex()) ; @@ -414,6 +425,10 @@ void SharedFilesDialog::changeCurrentViewModel(int viewTypeIndex) void LocalSharedFilesDialog::showProperColumns() { + ui.dirTreeView->setColumnHidden(COLUMN_NAME, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_SIZE, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_AGE, false) ; + if(model == tree_model) { ui.dirTreeView->setColumnHidden(COLUMN_FILENB, false) ; @@ -439,6 +454,10 @@ void LocalSharedFilesDialog::showProperColumns() } void RemoteSharedFilesDialog::showProperColumns() { + ui.dirTreeView->setColumnHidden(COLUMN_NAME, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_SIZE, false) ; + ui.dirTreeView->setColumnHidden(COLUMN_AGE, false) ; + if(model == tree_model) { ui.dirTreeView->setColumnHidden(COLUMN_FILENB, false) ;