Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correction of icon
[modules/shaper.git]
/
src
/
PartSet
/
PartSet_WidgetSketchLabel.cpp
diff --git
a/src/PartSet/PartSet_WidgetSketchLabel.cpp
b/src/PartSet/PartSet_WidgetSketchLabel.cpp
index 5925437ed68ebcdf91fe921535220636c0141e50..96435f627a95826200c5ed20017793ba04989e46 100644
(file)
--- a/
src/PartSet/PartSet_WidgetSketchLabel.cpp
+++ b/
src/PartSet/PartSet_WidgetSketchLabel.cpp
@@
-7,6
+7,8
@@
#include "PartSet_WidgetSketchLabel.h"
#include "PartSet_Tools.h"
#include "PartSet_WidgetSketchLabel.h"
#include "PartSet_Tools.h"
+#include "SketchPlugin_SketchEntity.h"
+
#include <XGUI_Workshop.h>
#include <XGUI_Displayer.h>
#include <XGUI_SelectionMgr.h>
#include <XGUI_Workshop.h>
#include <XGUI_Displayer.h>
#include <XGUI_SelectionMgr.h>
@@
-72,7
+74,9
@@
PartSet_WidgetSketchLabel::~PartSet_WidgetSketchLabel()
QList<QWidget*> PartSet_WidgetSketchLabel::getControls() const
{
QList<QWidget*> PartSet_WidgetSketchLabel::getControls() const
{
- return QList<QWidget*>();
+ QList<QWidget*> aResult;
+ aResult << myLabel;
+ return aResult;
}
void PartSet_WidgetSketchLabel::onPlaneSelected()
}
void PartSet_WidgetSketchLabel::onPlaneSelected()
@@
-91,7
+95,7
@@
void PartSet_WidgetSketchLabel::onPlaneSelected()
DataPtr aData = feature()->data();
AttributeSelectionPtr aSelAttr =
std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
DataPtr aData = feature()->data();
AttributeSelectionPtr aSelAttr =
std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
- (aData->attribute(SketchPlugin_
Feature
::EXTERNAL_ID()));
+ (aData->attribute(SketchPlugin_
SketchEntity
::EXTERNAL_ID()));
if (aSelAttr) {
ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aPrs.object());
if (aRes) {
if (aSelAttr) {
ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aPrs.object());
if (aRes) {
@@
-132,6
+136,17
@@
std::shared_ptr<GeomAPI_Pln> PartSet_WidgetSketchLabel::plane() const
}
}
+bool PartSet_WidgetSketchLabel::focusTo()
+{
+ myLabel->setFocus();
+ return true;
+}
+
+void PartSet_WidgetSketchLabel::enableFocusProcessing()
+{
+ myLabel->installEventFilter(this);
+}
+
void PartSet_WidgetSketchLabel::activateCustom()
{
std::shared_ptr<GeomAPI_Pln> aPlane = plane();
void PartSet_WidgetSketchLabel::activateCustom()
{
std::shared_ptr<GeomAPI_Pln> aPlane = plane();