Sort files chronologically in descending order
Signed-off-by: Qaz <dev@malplena.net>
This commit is contained in:
parent
01015a7345
commit
7fbf0d3bf3
@ -242,6 +242,10 @@ ScreenshotsPage::ScreenshotsPage(QString path, QWidget* parent) : QMainWindow(pa
|
|||||||
m_model->setReadOnly(false);
|
m_model->setReadOnly(false);
|
||||||
m_model->setNameFilters({ "*.png" });
|
m_model->setNameFilters({ "*.png" });
|
||||||
m_model->setNameFilterDisables(false);
|
m_model->setNameFilterDisables(false);
|
||||||
|
// Sorts by modified date instead of creation date because that column is not available and would require subclassing, this should work
|
||||||
|
// considering screenshots aren't modified after creation.
|
||||||
|
constexpr int file_modified_column_index = 3;
|
||||||
|
m_model->sort(file_modified_column_index, Qt::DescendingOrder);
|
||||||
m_folder = path;
|
m_folder = path;
|
||||||
m_valid = FS::ensureFolderPathExists(m_folder);
|
m_valid = FS::ensureFolderPathExists(m_folder);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user