diff --git a/Fltk/openglWindow.cpp b/Fltk/openglWindow.cpp index 2d90a691cba9b8fa16dbb886b9fef879a018b40b..f212cdb7f40347e2b663702e092b94648ee2bed5 100644 --- a/Fltk/openglWindow.cpp +++ b/Fltk/openglWindow.cpp @@ -358,7 +358,7 @@ int openglWindow::handle(int event) std::vector<MElement*> elements; std::vector<SPoint2> points; std::vector<PView*> views; - _select(ENT_ALL, false, false, Fl::event_x(), Fl::event_y(), 5, 5, + _select(ENT_ALL, false, false, true, Fl::event_x(), Fl::event_y(), 5, 5, vertices, edges, faces, regions, elements, points, views); if(vertices.size() && CTX::instance()->geom.doubleClickedPointCommand.size()){ CTX::instance()->geom.doubleClickedEntityTag = vertices[0]->tag(); @@ -651,6 +651,7 @@ int openglWindow::handle(int event) std::vector<SPoint2> points; std::vector<PView*> views; bool res = _select(_selection, false, CTX::instance()->mouseHoverMeshes, + CTX::instance()->mouseHoverMeshes, (int)_curr.win[0], (int)_curr.win[1], 5, 5, vertices, edges, faces, regions, elements, points, views); if((_selection == ENT_ALL && res) || @@ -730,7 +731,7 @@ int openglWindow::pixel_h() #endif } -bool openglWindow::_select(int type, bool multiple, bool mesh, +bool openglWindow::_select(int type, bool multiple, bool mesh, bool post, int x, int y, int w, int h, std::vector<GVertex*> &vertices, std::vector<GEdge*> &edges, @@ -746,7 +747,7 @@ bool openglWindow::_select(int type, bool multiple, bool mesh, if(_lock) return false; _lock = true; make_current(); - bool ret = _ctx->select(type, multiple, mesh, x, y, w, h, + bool ret = _ctx->select(type, multiple, mesh, post, x, y, w, h, vertices, edges, faces, regions, elements, points, views); _lock = false; @@ -808,7 +809,7 @@ char openglWindow::selectEntity(int type, selectionMode = false; return 'c'; } - else if(_select(_selection, multi, true, _trySelectionXYWH[0], + else if(_select(_selection, multi, true, false, _trySelectionXYWH[0], _trySelectionXYWH[1], _trySelectionXYWH[2], _trySelectionXYWH[3], vertices, edges, faces, regions, elements, points, views)){ diff --git a/Fltk/openglWindow.h b/Fltk/openglWindow.h index bbcb70581da24139b6a443761752bb23f4f290fb..9080b8cc1cf21af78cb76b36037401ca36a7a11b 100644 --- a/Fltk/openglWindow.h +++ b/Fltk/openglWindow.h @@ -32,7 +32,7 @@ class openglWindow : public Fl_Gl_Window { double _lassoXY[2]; void _drawScreenMessage(); void _drawBorder(); - bool _select(int type, bool multiple, bool mesh, int x, int y, int w, int h, + bool _select(int type, bool multiple, bool mesh, bool post, int x, int y, int w, int h, std::vector<GVertex*> &vertices, std::vector<GEdge*> &edges, std::vector<GFace*> &faces, std::vector<GRegion*> ®ions, std::vector<MElement*> &elements, std::vector<SPoint2> &points, diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp index 8756a4a3e221c7fe8e7a3612395b33702b5f3073..9534184e0b0ea16ac60e4347ca13d33063d62063 100644 --- a/Fltk/optionWindow.cpp +++ b/Fltk/optionWindow.cpp @@ -1389,7 +1389,7 @@ optionWindow::optionWindow(int deltaFontSize) general.butt[2]->callback(general_options_ok_cb, (void*)"fast_redraw"); general.butt[11] = new Fl_Check_Button - (L + 2 * WB, 2 * WB + 6 * BH, BW, BH, "Enable mouse hover over meshes"); + (L + 2 * WB, 2 * WB + 6 * BH, BW, BH, "Enable mouse hover over meshes and views"); general.butt[11]->type(FL_TOGGLE_BUTTON); general.butt[11]->callback(general_options_ok_cb); diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp index b7ab50a120e4a813f2328489dc45b3301105b382..ca3e443a40f3265455abce471df88bcba6a5e284 100644 --- a/Graphics/drawContext.cpp +++ b/Graphics/drawContext.cpp @@ -860,7 +860,7 @@ static MElement *getElement(GEntity *e, int va_type, int index) return 0; } -bool drawContext::select(int type, bool multiple, bool mesh, +bool drawContext::select(int type, bool multiple, bool mesh, bool post, int x, int y, int w, int h, std::vector<GVertex*> &vertices, std::vector<GEdge*> &edges, @@ -903,7 +903,7 @@ bool drawContext::select(int type, bool multiple, bool mesh, initPosition(); drawGeom(); if(mesh) drawMesh(); - drawPost(); + if(post) drawPost(); drawGraph2d(true); // 2d stuff diff --git a/Graphics/drawContext.h b/Graphics/drawContext.h index e973add3e9c6c42b5e6b3d69f2e2c0e1f6f932c2..49ea2df1576cb4d72c1a3a5c97142e8b1965e209 100644 --- a/Graphics/drawContext.h +++ b/Graphics/drawContext.h @@ -200,7 +200,7 @@ class drawContext { void unproject(double winx, double winy, double p[3], double d[3]); void viewport2World(double vp[3], double xyz[3]); void world2Viewport(double xyz[3], double vp[3]); - bool select(int type, bool multiple, bool mesh, int x, int y, int w, int h, + bool select(int type, bool multiple, bool mesh, bool post, int x, int y, int w, int h, std::vector<GVertex*> &vertices, std::vector<GEdge*> &edges, std::vector<GFace*> &faces, std::vector<GRegion*> ®ions, std::vector<MElement*> &elements, std::vector<SPoint2> &points,