Skip to content

Commit

Permalink
fixed an error with not being able to write to a new file
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Jan 30, 2012
1 parent b846fe5 commit a167563
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/view/LTFrame.cpp
Expand Up @@ -87,6 +87,7 @@ void LTFrame::onToolbarSettings(wxCommandEvent& event)
void LTFrame::onToolbarOpenScenario(wxCommandEvent& event)
{
openScenarioDialog->SetDirectory(currentScenarioDir);
printf("%s\n", currentScenarioDir.mb_str().data());
int id=openScenarioDialog->ShowModal();

if (id==wxID_OK)
Expand Down
4 changes: 2 additions & 2 deletions src/view/LTPage_Script.cpp
Expand Up @@ -175,9 +175,9 @@ void LTPage_Script::write(wxFileName fname)
wxBeginBusyCursor();

ScenarioFileController * newScn = new ScenarioFileController();
newScn->setPath(fname.GetFullPath().mb_str().data());
newScn->setPath(baseScenario.GetFullPath().mb_str().data());
newScn->copyTriggers(currentFile);
newScn->write();
newScn->write(fname.GetFullPath().mb_str().data());
delete newScn;

onOpenFile(fname);
Expand Down

0 comments on commit a167563

Please sign in to comment.