GH-1731 Do not show screenshots model if it can't be set up properly
Otherwise it would show all system drives instead of screenshots.
This commit is contained in:
		@@ -223,7 +223,6 @@ ScreenshotsPage::ScreenshotsPage(QString path, QWidget *parent)
 | 
			
		||||
 | 
			
		||||
	ui->setupUi(this);
 | 
			
		||||
	ui->tabWidget->tabBar()->hide();
 | 
			
		||||
	ui->listView->setModel(m_filterModel.get());
 | 
			
		||||
	ui->listView->setIconSize(QSize(128, 128));
 | 
			
		||||
	ui->listView->setGridSize(QSize(192, 160));
 | 
			
		||||
	ui->listView->setSpacing(9);
 | 
			
		||||
@@ -354,6 +353,7 @@ void ScreenshotsPage::opened()
 | 
			
		||||
{
 | 
			
		||||
	if (m_valid)
 | 
			
		||||
	{
 | 
			
		||||
		ui->listView->setModel(m_filterModel.get());
 | 
			
		||||
		QString path = QDir(m_folder).absolutePath();
 | 
			
		||||
		m_model->setRootPath(path);
 | 
			
		||||
		ui->listView->setRootIndex(m_filterModel->mapFromSource(m_model->index(path)));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user