From 2c7d185fdb03d17475deb9af1edaa82ffa51d4b6 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 29 Nov 2010 13:53:05 +0000 Subject: Prevent the 'testmodel' function from reporting a missing model twice. --- src/client/testmodelview.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/client') 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()); } -- cgit v1.2.3