diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 2dce56137df12d1572e2e5233c36a542976bef20..a8af3330a54629f995c9ebd4891809ac704f6bea 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -526,7 +526,7 @@ StringXNumber GeneralOptions_Number[] = { { F|S, "MenuPositionY" , opt_general_menu_position1 , 400. , "Vertical position (in pixels) of the (detached) menu tree" }, { F|S, "MessageHeight" , opt_general_message_size , 300. , - "Height (in pixels) of the message console" }, + "Height (in pixels) of the message console when it is visible (should be > 0)" }, { F, "MinX" , opt_general_xmin , 0. , "Minimum model coordinate along the X-axis (read-only)" }, { F, "MinY" , opt_general_ymin , 0. , diff --git a/Common/Options.cpp b/Common/Options.cpp index 5b3028919a13e1d73eb1b379e1fe871814846106..d7a2615ede9455c752e9e2e86ee8163a7dae8812 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1909,13 +1909,8 @@ double opt_general_message_size(OPT_ARGS_NUM) { if(action & GMSH_SET){ CTX::instance()->msgSize = (int)val; - if(CTX::instance()->msgSize < 0) CTX::instance()->msgSize = 0; + if(CTX::instance()->msgSize <= 0) CTX::instance()->msgSize = 100; } -#if defined(HAVE_FLTK) - if(FlGui::available() && (action & GMSH_GUI)){ - FlGui::instance()->graph[0]->setMessageHeight(CTX::instance()->msgSize); - } -#endif return CTX::instance()->msgSize; } diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp index e01f8c4764d6fbe43f0c6e031136d2818ba05d2d..39e4f8d45d4feda299c3efd42ee2ec61bfd6959b 100644 --- a/Fltk/FlGui.cpp +++ b/Fltk/FlGui.cpp @@ -857,7 +857,8 @@ void FlGui::storeCurrentWindowsInfo() CTX::instance()->glPosition[1] = graph[0]->getWindow()->y(); CTX::instance()->glSize[0] = graph[0]->getGlWidth(); CTX::instance()->glSize[1] = graph[0]->getGlHeight(); - CTX::instance()->msgSize = graph[0]->getMessageHeight(); + CTX::instance()->msgSize = graph[0]->getMessageHeight() ? + graph[0]->getMessageHeight() : CTX::instance()->msgSize; CTX::instance()->menuSize[0] = graph[0]->getMenuWidth(); if(graph[0]->isMenuDetached()){ CTX::instance()->detachedMenu = 1;