Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/8209_icat_datetime_fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Oct 29, 2013
2 parents 8f4a71e + 0797b93 commit d025958
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/ICat/src/ICat4/ICat4Catalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,12 @@ namespace Mantid
// Again, we need to check first if start and end date exist prior to insertion.
if (investigation->startDate)
{
std::string startDate = formatDateTime(*investigation->startDate, "%d-%m-%y");
std::string startDate = formatDateTime(*investigation->startDate, "%Y-%m-%d");
savetoTableWorkspace(&startDate, table);
}
if (investigation->endDate)
{
std::string endDate = formatDateTime(*investigation->endDate, "%d-%m-%y");
std::string endDate = formatDateTime(*investigation->endDate, "%Y-%m-%d");
savetoTableWorkspace(&endDate, table);
}
}
Expand Down
12 changes: 8 additions & 4 deletions Code/Mantid/MantidQt/MantidWidgets/src/ICatSearch2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,6 @@ namespace MantidQt
table->setSortingEnabled(false);
table->verticalHeader()->setVisible(false);

// Sort by endDate with the most recent being first.
table->sortByColumn(4,Qt::DescendingOrder);
table->setSortingEnabled(true);

// Set the height on each row to 20 for UX improvement.
for (size_t i = 0; i < numOfRows; ++i)
{
Expand Down Expand Up @@ -703,6 +699,10 @@ namespace MantidQt

// Show only a portion of the title as they can be quite long.
resultsTable->setColumnWidth(headerIndexByName(resultsTable, "Title"), 210);

// Sort by endDate with the most recent being first.
resultsTable->setSortingEnabled(true);
resultsTable->sortByColumn(headerIndexByName(resultsTable, "Start date"),Qt::DescendingOrder);
}

/**
Expand Down Expand Up @@ -848,6 +848,10 @@ namespace MantidQt

// Populate the "Filter type..." combo-box with all possible file extensions.
populateDataFileType(extensions);

// Sort by create time with the most recent being first.
dataFileTable->setSortingEnabled(true);
dataFileTable->sortByColumn(headerIndexByName(dataFileTable, "Name"),Qt::DescendingOrder);
}

/**
Expand Down

0 comments on commit d025958

Please sign in to comment.