Skip to content

Commit

Permalink
Refresh preview on editor exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Christensen committed Sep 13, 2012
1 parent b23539b commit 9aa88ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Binary file modified launcher/launcher
Binary file not shown.
12 changes: 9 additions & 3 deletions launcher/wtf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ void mW::on_btnStart_clicked()
cout <<" osgg > " << buffer;
output << buffer;
}

//if we were in the editor, let's refresh the preview
if( runEditor )
{
preview( (osggUserDir.toStdString()+"/levels/"+osggCustomLevel.toStdString()+".level").data() );
}

//Clear isDemo and runEditor
isDemo=0;
Expand Down Expand Up @@ -419,9 +425,6 @@ void mW::preview(const char* file)
pScene = new lvlPrevScene();
pScene->load(file);

lvlPreview->scale(0.5, -0.5);
lvlPreview->setRenderHints(QPainter::Antialiasing);

lvlPreview->setScene( pScene );
}

Expand Down Expand Up @@ -586,6 +589,9 @@ mW::mW(QMainWindow* p) : QMainWindow(p)

QObject::connect(tabLvl, SIGNAL(currentChanged(int)), this, SLOT(on_tabLvlCurrentChanged(int)) );

lvlPreview->scale(0.5, -0.5);
lvlPreview->setRenderHints(QPainter::Antialiasing);

on_numStartLevel_valueChanged(0);
isDemo=0;
runEditor=0;
Expand Down

0 comments on commit 9aa88ec

Please sign in to comment.