goat3d

diff goatview/src/goatview.cc @ 94:21319e71117f

[libs] fixed a few warnings in openctm [goatview] starting animation loading
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 18 May 2014 19:58:47 +0300
parents 07c0ec4a410d
children da100bf13f7f
line diff
     1.1 --- a/goatview/src/goatview.cc	Sun May 18 06:20:20 2014 +0300
     1.2 +++ b/goatview/src/goatview.cc	Sun May 18 19:58:47 2014 +0300
     1.3 @@ -233,12 +233,26 @@
     1.4  	statusBar()->showMessage("opening scene file");
     1.5  	if(!load_scene(fname.c_str())) {
     1.6  		statusBar()->showMessage("failed to load scene file");
     1.7 +		return;
     1.8  	}
     1.9 +	statusBar()->showMessage("Successfully loaded scene: " + QString(fname));
    1.10  }
    1.11  
    1.12  void GoatView::open_anim()
    1.13  {
    1.14 -	statusBar()->showMessage("opening animation...");
    1.15 +	std::string fname = QFileDialog::getOpenFileName(this, "Open animation file", "",
    1.16 +		"Goat3D Animation (*.goatanm);;All Files (*)").toStdString();
    1.17 +	if(fname.empty()) {
    1.18 +		statusBar()->showMessage("Abot: No file selected!");
    1.19 +		return;
    1.20 +	}
    1.21 +
    1.22 +	statusBar()->showMessage("opening animation file");
    1.23 +	if(!load_anim(fname.c_str())) {
    1.24 +		statusBar()->showMessage("failed to load animation file");
    1.25 +		return;
    1.26 +	}
    1.27 +	statusBar()->showMessage("Successfully loaded animation: " + QString(fname));
    1.28  }
    1.29  
    1.30