Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-11-29 13:53:05 +0000
committerStijn Buys <ingar@osirion.org>2010-11-29 13:53:05 +0000
commit2c7d185fdb03d17475deb9af1edaa82ffa51d4b6 (patch)
tree5ef75c45225e69488ad6c0fb520d0bd357c29e43
parent409d3ce47d8a4d48947c7b19fc2460fd801b742c (diff)
Prevent the 'testmodel' function from reporting a missing model twice.
-rw-r--r--src/client/testmodelview.cc6
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());
}