Skip to content

Commit

Permalink
Refs #10431 Create default table in helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jeffery committed Oct 27, 2014
1 parent 6f5a689 commit bef0927
Showing 1 changed file with 10 additions and 4 deletions.
Expand Up @@ -82,6 +82,15 @@ namespace

return ws;
}

ITableWorkspace_sptr createDefaultWorkspace()
{
//Create a blank workspace with one line and set the scale column to 1
auto ws = createWorkspace();
ws->appendRow();
ws->Double(0, MantidQt::CustomInterfaces::ReflMainViewPresenter::COL_SCALE) = 1.0;
return ws;
}
}

namespace MantidQt
Expand Down Expand Up @@ -866,13 +875,10 @@ namespace MantidQt
if(!m_view->askUserYesNo("Your current table has unsaved changes. Are you sure you want to discard them?","Start New Table?"))
return;

m_model = createWorkspace();
m_model = createDefaultWorkspace();
m_wsName.clear();
m_view->showTable(m_model);

//Start with one blank row
insertRow(0);

m_tableDirty = false;
}

Expand Down

0 comments on commit bef0927

Please sign in to comment.