diff --git a/Geo/Chain.cpp b/Geo/Chain.cpp index dd80308fd12840ed93b8b2ed9af96f1c2388e485..29e06b67d0d3d66852c9120aad22280fefa7138f 100644 --- a/Geo/Chain.cpp +++ b/Geo/Chain.cpp @@ -20,10 +20,10 @@ #if defined(HAVE_KBIPACK) -void updateFltkTree() +void updateFltk() { #if defined(HAVE_FLTK) - FlGui::instance()->rebuildTree(); + if(FlGui::available()) FlGui::instance()->updateViews(); #endif } diff --git a/Geo/Chain.h b/Geo/Chain.h index 096f5692fe34c73814d697eff50c27ad2ccc4552..cc85df9b4f5fd45c1b56e6a704bb2a9dcd2c9090 100644 --- a/Geo/Chain.h +++ b/Geo/Chain.h @@ -20,7 +20,7 @@ #if defined(HAVE_KBIPACK) -void updateFltkTree(); +void updateFltk(); std::string convertInt(int number); // Class whose derivative classes are to have partial or total order @@ -503,7 +503,7 @@ void Chain<C>::addToModel(GModel* m, bool post, // create PView for instant visualization std::string pnum = convertInt(physicalNum); std::string postname = pnum + "=" + _name; - PView* view = new PView(postname, "ElementData", m, data, 0, 1); + PView* view = new PView(postname, "ElementData", m, data, 0., 1); // the user should be interested about the orientations int size = 30; PViewOptions* opt = view->getOptions(); @@ -511,7 +511,7 @@ void Chain<C>::addToModel(GModel* m, bool post, if(opt->tangents == 0) opt->tangents = size; if(opt->normals == 0) opt->normals = size; view->setOptions(opt); - updateFltkTree(); + updateFltk(); } #endif }