From 3264b4a29ab742384af02f661e289633f8d7234e Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 28 Aug 2018 16:41:46 +0300 Subject: [PATCH] Process enter key by Point input widget --- src/ModuleBase/ModuleBase_WidgetPointInput.cpp | 10 ++++++++++ src/ModuleBase/ModuleBase_WidgetPointInput.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/ModuleBase/ModuleBase_WidgetPointInput.cpp b/src/ModuleBase/ModuleBase_WidgetPointInput.cpp index 9b225ef78..7917a909a 100644 --- a/src/ModuleBase/ModuleBase_WidgetPointInput.cpp +++ b/src/ModuleBase/ModuleBase_WidgetPointInput.cpp @@ -191,3 +191,13 @@ bool ModuleBase_WidgetPointInput } return false; } + +//******************************************************************** +bool ModuleBase_WidgetPointInput::processEnter() +{ + bool isModified = getValueState() == ModifiedInPP; + if (isModified) { + emit valuesChanged(); + } + return isModified; +} diff --git a/src/ModuleBase/ModuleBase_WidgetPointInput.h b/src/ModuleBase/ModuleBase_WidgetPointInput.h index d0e9c790d..7b6ec3b59 100644 --- a/src/ModuleBase/ModuleBase_WidgetPointInput.h +++ b/src/ModuleBase/ModuleBase_WidgetPointInput.h @@ -68,6 +68,9 @@ protected: /// \return a list of shapes virtual QIntList shapeTypes() const; + /// Returns true if the event is processed. + virtual bool processEnter(); + protected: ModuleBase_ParamSpinBox* myXSpin; ModuleBase_ParamSpinBox* myYSpin; -- 2.39.2