From 0cf810aaf3988cbaecb6d4dbd45188e1e5ea9e1a Mon Sep 17 00:00:00 2001
From: Maxime Graulich <maxime.graulich@gmail.com>
Date: Thu, 19 Sep 2013 11:53:03 +0000
Subject: [PATCH]

---
 contrib/mobile/drawGeom.cpp                      | 9 +++++----
 contrib/mobile/drawMesh.cpp                      | 3 ++-
 contrib/mobile/iOS/Onelab/ModelViewController.mm | 2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/contrib/mobile/drawGeom.cpp b/contrib/mobile/drawGeom.cpp
index 131fb116f3..471659b155 100644
--- a/contrib/mobile/drawGeom.cpp
+++ b/contrib/mobile/drawGeom.cpp
@@ -33,7 +33,7 @@ void drawGeomVertex(GVertex *v)
                (GLubyte)CTX::instance()->unpackBlue(col),
                (GLubyte)CTX::instance()->unpackAlpha(col));
 	const GLfloat p[] = {(GLfloat)v->x(), (GLfloat)v->y(), (GLfloat)v->z()};
-	glPointSize((GLfloat)(CTX::instance()->geom.pointSize>0)? 3:1);
+	glPointSize((GLfloat)CTX::instance()->geom.pointSize);
 	glVertexPointer(3, GL_FLOAT, 0, p);
 	glEnableClientState(GL_VERTEX_ARRAY);
 	glDrawArrays(GL_POINTS, 0, 1);
@@ -66,11 +66,14 @@ void drawGeomEdge(GEdge *e)
 		edge[i*3] = p.x(); edge[i*3+1] = p.y(); edge[i*3+2] = p.z();
 	}
 	// Then print the VA
+	glLineWidth((GLfloat)CTX::instance()->geom.lineWidth);
 	glVertexPointer(3, GL_FLOAT, 0, edge);
 	glEnableClientState(GL_VERTEX_ARRAY);
+	glEnable(GL_LINE_SMOOTH);
 	glDrawArrays(GL_LINE_STRIP, 0, N);
+	glDisable(GL_LINE_SMOOTH);
 	glDisableClientState(GL_VERTEX_ARRAY);
-        free(edge);
+	free(edge);
 }
 void drawGeomFace(GFace *f)
 {
@@ -78,8 +81,6 @@ void drawGeomFace(GFace *f)
 }
 void drawContext::drawGeom()
 {
-	if(!CTX::instance()->geom.draw) return;
-
 	for(unsigned int i=0; i<GModel::list.size(); i++) {
 		GModel *m = GModel::list[i];
 		if(!m->getVisibility()) continue;
diff --git a/contrib/mobile/drawMesh.cpp b/contrib/mobile/drawMesh.cpp
index e608153f1c..4ca5e264d3 100644
--- a/contrib/mobile/drawMesh.cpp
+++ b/contrib/mobile/drawMesh.cpp
@@ -49,7 +49,7 @@ void drawMeshVertex(GVertex *e)
 				col = CTX::instance()->color.mesh.vertex;
 		}
         else
-            col = getColorByEntity(e);
+        col = getColorByEntity(e);
         color.push_back((GLubyte)CTX::instance()->unpackRed(col));
         color.push_back((GLubyte)CTX::instance()->unpackGreen(col));
         color.push_back((GLubyte)CTX::instance()->unpackBlue(col));
@@ -75,6 +75,7 @@ void drawMeshEdge(GEdge *e)
         else
             return;
     }
+    glLineWidth(CTX::instance()->mesh.lineWidth);
 	drawArray(e->va_lines, GL_LINES, true);
 }
 void drawMeshFace(GFace *f)
diff --git a/contrib/mobile/iOS/Onelab/ModelViewController.mm b/contrib/mobile/iOS/Onelab/ModelViewController.mm
index d765ddc492..eb48865ff6 100644
--- a/contrib/mobile/iOS/Onelab/ModelViewController.mm
+++ b/contrib/mobile/iOS/Onelab/ModelViewController.mm
@@ -247,7 +247,7 @@
 }
 
 - (IBAction)singleTap:(UITapGestureRecognizer *)sender {
-	[self.navigationController setToolbarHidden:!self.navigationController.toolbarHidden animated:YES];
+	[self.navigationController setToolbarHidden:(!(self.navigationController.toolbarHidden && !((AppDelegate *)[UIApplication sharedApplication].delegate)->compute && number_of_animation() > 0)) animated:YES];
 }
 
 - (IBAction)doubleTap:(UITapGestureRecognizer *)sender {
-- 
GitLab