Skip to content
Snippets Groups Projects
Commit 781660da authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

better detection of the view number
parent f5753b91
No related branches found
No related tags found
No related merge requests found
// $Id: CutMap.cpp,v 1.39 2004-10-30 03:07:29 geuzaine Exp $
// $Id: CutMap.cpp,v 1.40 2004-10-30 15:23:23 geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
......@@ -49,7 +49,9 @@ double GMSH_CutMapPlugin::callbackA(int num, int action, double value)
{
double min = 0., max = 1.;
if(action > 0){
Post_View *v = (Post_View*)List_Pointer_Test(CTX.post.list, num);
int iview = (int)CutMapOptions_Number[3].def;
if(iview < 0) iview = num;
Post_View *v = (Post_View*)List_Pointer_Test(CTX.post.list, iview);
if(v){
min = v->Min;
max = v->Max;
......
// $Id: CutPlane.cpp,v 1.35 2004-10-30 03:07:29 geuzaine Exp $
// $Id: CutPlane.cpp,v 1.36 2004-10-30 15:23:23 geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
......@@ -56,7 +56,9 @@ GMSH_CutPlanePlugin::GMSH_CutPlanePlugin()
void GMSH_CutPlanePlugin::draw()
{
#if defined(HAVE_FLTK)
Post_View *v = (Post_View*)List_Pointer_Test(CTX.post.list, iview);
int num = (int)CutPlaneOptions_Number[4].def;
if(num < 0) num = iview;
Post_View *v = (Post_View*)List_Pointer_Test(CTX.post.list, num);
if(!v) return;
Draw_PlaneInBoundingBox(v->BBox[0], v->BBox[2], v->BBox[4],
v->BBox[1], v->BBox[3], v->BBox[5],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment