From 09a126324144993ab5ac491379d2de25ab6a4274 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sat, 1 Apr 2017 00:34:09 +0100
Subject: [PATCH] polish new gui

---
 Fltk/contextWindow.cpp |  1 +
 Fltk/graphicWindow.cpp | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Fltk/contextWindow.cpp b/Fltk/contextWindow.cpp
index 846c574b2f..bebdccf86e 100644
--- a/Fltk/contextWindow.cpp
+++ b/Fltk/contextWindow.cpp
@@ -656,6 +656,7 @@ static void selection_mode_cb(Fl_Widget *w, void *data)
   for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++)
     for(unsigned int j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++)
       FlGui::instance()->graph[i]->gl[j]->changeSelection = mode;
+  drawContext::global()->draw();
 }
 
 transformContextWindow::transformContextWindow(int deltaFontSize)
diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp
index aa5b3d4a5e..71e3295f03 100644
--- a/Fltk/graphicWindow.cpp
+++ b/Fltk/graphicWindow.cpp
@@ -1565,7 +1565,15 @@ static void geometry_elementary_boolean_cb(Fl_Widget *w, void *data)
                     "[Press 'e' to end selection, 'u' to undo last selection or "
                     "'q' to abort]");
 
-    char ib = FlGui::instance()->selectEntity(ENT_ALL);
+    int type = ENT_ALL;
+    switch(FlGui::instance()->transformContext->choice->value()){
+    case 1: type = ENT_POINT; break;
+    case 2: type = ENT_LINE; break;
+    case 3: type = ENT_SURFACE; break;
+    case 4: type = ENT_VOLUME; break;
+    }
+
+    char ib = FlGui::instance()->selectEntity(type);
     if(ib == 'l') {
       for(unsigned int i = 0; i < FlGui::instance()->selectedEdges.size(); i++){
         if(FlGui::instance()->selectedEdges[i]->getSelection() != 1){
-- 
GitLab