diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-29 13:53:05 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-29 13:53:05 +0000 |
commit | 2c7d185fdb03d17475deb9af1edaa82ffa51d4b6 (patch) | |
tree | 5ef75c45225e69488ad6c0fb520d0bd357c29e43 | |
parent | 409d3ce47d8a4d48947c7b19fc2460fd801b742c (diff) |
Prevent the 'testmodel' function from reporting a missing model twice.
-rw-r--r-- | src/client/testmodelview.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/testmodelview.cc b/src/client/testmodelview.cc index 31dc98f..4164d6c 100644 --- a/src/client/testmodelview.cc +++ b/src/client/testmodelview.cc @@ -37,7 +37,6 @@ TestModelView::~TestModelView() void TestModelView::set_modelname(const std::string & modelname) { model::Model *model = model::Model::load(modelname); - testmodelview_modelview->set_modelname(modelname); std::ostringstream str; str << modelname << '\n'; @@ -52,6 +51,11 @@ void TestModelView::set_modelname(const std::string & modelname) str << "tris: " << model->model_tris_count << '\n'; str << "quads: " << model->model_quad_count << '\n'; str << "fragments: " << frags << '\n'; + + testmodelview_modelview->set_modelname(modelname); + } else { + testmodelview_modelview->set_modelname(""); + testmodelview_modelview->set_background(true); } testmodelview_text->set_text(str.str()); } |