From 8efc0c77122214a2c0dc8cba915354b84ca789c9 Mon Sep 17 00:00:00 2001 From: sbh Date: Tue, 14 Apr 2015 17:54:24 +0300 Subject: [PATCH] Fix for issue #453: correct display of a exprassion eval result under Debian --- src/ModelAPI/CMakeLists.txt | 1 + src/ModelAPI/ModelAPI_ResultParameter.h | 5 ++++- src/ModuleBase/ModuleBase_WidgetExprEditor.cpp | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ModelAPI/CMakeLists.txt b/src/ModelAPI/CMakeLists.txt index a171d2748..2fb0d5ba4 100644 --- a/src/ModelAPI/CMakeLists.txt +++ b/src/ModelAPI/CMakeLists.txt @@ -65,6 +65,7 @@ SET(PROJECT_SOURCES ModelAPI_ResultConstruction.cpp ModelAPI_ResultGroup.cpp ModelAPI_ResultPart.cpp + ModelAPI_ResultParameter.cpp ModelAPI_Session.cpp ModelAPI_ShapeValidator.cpp ModelAPI_Tools.cpp diff --git a/src/ModelAPI/ModelAPI_ResultParameter.h b/src/ModelAPI/ModelAPI_ResultParameter.h index 1b9dccdf7..ad47ce9c7 100644 --- a/src/ModelAPI/ModelAPI_ResultParameter.h +++ b/src/ModelAPI/ModelAPI_ResultParameter.h @@ -7,7 +7,8 @@ #ifndef MODELAPI_RESULTPARAMETER_H_ #define MODELAPI_RESULTPARAMETER_H_ -#include "ModelAPI_Result.h" +#include +#include /**\class ModelAPI_ResultParameter * \ingroup DataModel @@ -46,6 +47,8 @@ class ModelAPI_ResultParameter : public ModelAPI_Result virtual void initAttributes() = 0; + MODELAPI_EXPORT ~ModelAPI_ResultParameter(); + }; //! Pointer on feature object diff --git a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp index f96eec92c..346b324c8 100644 --- a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -153,6 +154,9 @@ ModuleBase_WidgetExprEditor::ModuleBase_WidgetExprEditor(QWidget* theParent, myResultLabel = new QLabel(this); myResultLabel->setWordWrap(true); + QFontMetrics fm(myResultLabel->font()); + myResultLabel->setMinimumHeight(fm.height() * 2); // set 2 line height as minimum + myResultLabel->setAlignment(Qt::AlignLeft|Qt::AlignBottom); aMainLay->addWidget(myResultLabel); myEditor = new ExpressionEditor(this); myEditor->setMinimumHeight(20); -- 2.39.2