Skip to content
Snippets Groups Projects
Commit 6022033f authored by Doucet, Mathieu's avatar Doucet, Mathieu
Browse files

Merge remote branch 'origin/bugfix/7443_save_dialog_file_extension_bug'

parents 6822ad57 8cefe0e1
No related merge requests found
......@@ -81,7 +81,7 @@ namespace Mantid
wsValidator->add<API::HistogramValidator>();
declareProperty(new API::WorkspaceProperty<>("InputWorkspace", "", Direction::Input,wsValidator),
"The input workspace, which must be in Energy Transfer");
declareProperty(new FileProperty("Filename","", FileProperty::Save),
declareProperty(new FileProperty("Filename","", FileProperty::Save,".spe"),
"The filename to use for the saved data");
}
......
......@@ -169,15 +169,22 @@ namespace API
{
// Hack off the first star that the filter returns
QString ext = selectedFilter;
if( selectedFilter.startsWith("*") )
if( selectedFilter.startsWith("*.") )
{
// 1 character from the start
ext = ext.remove(0,1);
}
else
{
ext = "";
}
if( filename.endsWith(".") && ext.startsWith(".") )
{
ext = ext.remove(0,1);
}
// Construct the full file name
filename += ext;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment