Salome HOME
projects
/
modules
/
shaper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bb1ac90
)
Issue #1906: Use validators for the field panel
author
vsv
<vitaly.smetannikov@opencascade.com>
Tue, 13 Dec 2016 13:36:59 +0000
(16:36 +0300)
committer
vsv
<vitaly.smetannikov@opencascade.com>
Tue, 13 Dec 2016 13:36:59 +0000
(16:36 +0300)
src/CollectionPlugin/CollectionPlugin_WidgetField.cpp
patch
|
blob
|
history
src/CollectionPlugin/CollectionPlugin_WidgetField.h
patch
|
blob
|
history
src/CollectionPlugin/plugin-Collection.xml
patch
|
blob
|
history
diff --git
a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp
b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp
index de74d3c4643831c3160cece278e3346aa6a589a9..fbf74355733b347be345dbd3a4f15cbc3e539b9b 100644
(file)
--- a/
src/CollectionPlugin/CollectionPlugin_WidgetField.cpp
+++ b/
src/CollectionPlugin/CollectionPlugin_WidgetField.cpp
@@
-793,7
+793,7
@@
void CollectionPlugin_WidgetField::onStepMove(int theStep)
//**********************************************************************************
bool CollectionPlugin_WidgetField::
//**********************************************************************************
bool CollectionPlugin_WidgetField::
- isValidSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs)
+ isValidSelection
Custom
(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs)
{
return (myShapeTypeCombo->currentIndex() == 5)? false : true;
}
{
return (myShapeTypeCombo->currentIndex() == 5)? false : true;
}
@@
-812,8
+812,7
@@
void CollectionPlugin_WidgetField::onSelectionChanged()
if (myShapeTypeCombo->currentIndex() == 5)
return;
if (myShapeTypeCombo->currentIndex() == 5)
return;
- QList<ModuleBase_ViewerPrsPtr> aSelected =
- myWorkshop->selection()->getSelected(ModuleBase_ISelection::AllControls);
+ QList<ModuleBase_ViewerPrsPtr> aSelected = getFilteredSelected();
AttributeSelectionListPtr aSelList =
myFeature->data()->selectionList(CollectionPlugin_Field::SELECTED_ID());
AttributeSelectionListPtr aSelList =
myFeature->data()->selectionList(CollectionPlugin_Field::SELECTED_ID());
diff --git
a/src/CollectionPlugin/CollectionPlugin_WidgetField.h
b/src/CollectionPlugin/CollectionPlugin_WidgetField.h
index 5f202f5517889c332f11fbd61689f5137cd55031..d732d99d408e86d692f8829dc7014ca7e7110604 100644
(file)
--- a/
src/CollectionPlugin/CollectionPlugin_WidgetField.h
+++ b/
src/CollectionPlugin/CollectionPlugin_WidgetField.h
@@
-51,7
+51,7
@@
public:
/// Checks the widget validity. By default, it returns true.
/// \param thePrs a selected presentation in the view
/// \return a boolean value
/// Checks the widget validity. By default, it returns true.
/// \param thePrs a selected presentation in the view
/// \return a boolean value
- virtual bool isValidSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
+ virtual bool isValidSelection
Custom
(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
/// Returns true if the event is processed.
virtual bool processEnter();
/// Returns true if the event is processed.
virtual bool processEnter();
diff --git
a/src/CollectionPlugin/plugin-Collection.xml
b/src/CollectionPlugin/plugin-Collection.xml
index 33042ac490d29ec6b9657d5f470ff129da9adb80..6ebd05466c8ab6af5b0c6513743e0c575c975420 100644
(file)
--- a/
src/CollectionPlugin/plugin-Collection.xml
+++ b/
src/CollectionPlugin/plugin-Collection.xml
@@
-14,7
+14,9
@@
title="Field"
tooltip="Create create fields for selected shapes"
icon="icons/Collection/field.png">
title="Field"
tooltip="Create create fields for selected shapes"
icon="icons/Collection/field.png">
- <field-panel/>
+ <field-panel id="selected">
+ <validator id="GeomValidators_BodyShapes"/>
+ </field-panel>
</feature>
</group>
</workbench>
</feature>
</group>
</workbench>