Gui: Rename SoFCEnableHighlightAction to preselection terminology.

This commit is contained in:
tritao
2025-01-15 13:39:32 +00:00
parent 4843377790
commit e79b5ff9e8
5 changed files with 43 additions and 43 deletions

View File

@@ -216,9 +216,9 @@ void SoFCSelection::doAction(SoAction *action)
if(!useNewSelection.getValue()) {
if (action->getTypeId() == SoFCEnableHighlightAction::getClassTypeId()) {
auto preaction = static_cast<SoFCEnableHighlightAction*>(action);
if (preaction->highlight) {
if (action->getTypeId() == SoFCEnablePreselectionAction::getClassTypeId()) {
auto preaction = static_cast<SoFCEnablePreselectionAction*>(action);
if (preaction->enabled) {
this->preselectionMode = SoFCSelection::AUTO;
}
else {
@@ -228,7 +228,7 @@ void SoFCSelection::doAction(SoAction *action)
if (action->getTypeId() == SoFCEnableSelectionAction::getClassTypeId()) {
auto selaction = static_cast<SoFCEnableSelectionAction*>(action);
if (selaction->selection) {
if (selaction->enabled) {
this->selectionMode = SoFCSelection::SEL_ON;
}
else {

View File

@@ -296,7 +296,7 @@ void SoFCEnableSelectionAction::finish()
SoFCEnableSelectionAction::SoFCEnableSelectionAction (const SbBool& sel)
: selection(sel)
: enabled(sel)
{
SO_ACTION_CONSTRUCTOR(SoFCEnableSelectionAction);
}
@@ -317,7 +317,7 @@ void SoFCEnableSelectionAction::callDoAction(SoAction *action,SoNode *node)
// ---------------------------------------------------------------
SO_ACTION_SOURCE(SoFCEnableHighlightAction)
SO_ACTION_SOURCE(SoFCEnablePreselectionAction)
/**
* The order of the defined SO_ACTION_ADD_METHOD statements is very important. First the base
@@ -327,28 +327,28 @@ SO_ACTION_SOURCE(SoFCEnableHighlightAction)
* This means that \c SoSwitch must be listed after \c SoGroup and \c SoFCSelection after
* \c SoSeparator because both classes inherits the others.
*/
void SoFCEnableHighlightAction::initClass()
void SoFCEnablePreselectionAction::initClass()
{
SO_ACTION_INIT_CLASS(SoFCEnableHighlightAction,SoAction);
SO_ACTION_INIT_CLASS(SoFCEnablePreselectionAction,SoAction);
SO_ENABLE(SoFCEnableHighlightAction, SoSwitchElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoSwitchElement);
SO_ACTION_ADD_METHOD(SoNode,nullAction);
SO_ENABLE(SoFCEnableHighlightAction, SoModelMatrixElement);
SO_ENABLE(SoFCEnableHighlightAction, SoShapeStyleElement);
SO_ENABLE(SoFCEnableHighlightAction, SoComplexityElement);
SO_ENABLE(SoFCEnableHighlightAction, SoComplexityTypeElement);
SO_ENABLE(SoFCEnableHighlightAction, SoCoordinateElement);
SO_ENABLE(SoFCEnableHighlightAction, SoFontNameElement);
SO_ENABLE(SoFCEnableHighlightAction, SoFontSizeElement);
SO_ENABLE(SoFCEnableHighlightAction, SoProfileCoordinateElement);
SO_ENABLE(SoFCEnableHighlightAction, SoProfileElement);
SO_ENABLE(SoFCEnableHighlightAction, SoSwitchElement);
SO_ENABLE(SoFCEnableHighlightAction, SoUnitsElement);
SO_ENABLE(SoFCEnableHighlightAction, SoViewVolumeElement);
SO_ENABLE(SoFCEnableHighlightAction, SoViewingMatrixElement);
SO_ENABLE(SoFCEnableHighlightAction, SoViewportRegionElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoModelMatrixElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoShapeStyleElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoComplexityElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoComplexityTypeElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoCoordinateElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoFontNameElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoFontSizeElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoProfileCoordinateElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoProfileElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoSwitchElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoUnitsElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoViewVolumeElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoViewingMatrixElement);
SO_ENABLE(SoFCEnablePreselectionAction, SoViewportRegionElement);
@@ -369,28 +369,28 @@ void SoFCEnableHighlightAction::initClass()
SO_ACTION_ADD_METHOD(SoFCSelection,callDoAction);
}
void SoFCEnableHighlightAction::finish()
void SoFCEnablePreselectionAction::finish()
{
atexit_cleanup();
}
SoFCEnableHighlightAction::SoFCEnableHighlightAction (const SbBool& sel)
: highlight(sel)
SoFCEnablePreselectionAction::SoFCEnablePreselectionAction (const SbBool& sel)
: enabled(sel)
{
SO_ACTION_CONSTRUCTOR(SoFCEnableHighlightAction);
SO_ACTION_CONSTRUCTOR(SoFCEnablePreselectionAction);
}
SoFCEnableHighlightAction::~SoFCEnableHighlightAction() = default;
SoFCEnablePreselectionAction::~SoFCEnablePreselectionAction() = default;
void SoFCEnableHighlightAction::beginTraversal(SoNode *node)
void SoFCEnablePreselectionAction::beginTraversal(SoNode *node)
{
traverse(node);
}
void SoFCEnableHighlightAction::callDoAction(SoAction *action,SoNode *node)
void SoFCEnablePreselectionAction::callDoAction(SoAction *action,SoNode *node)
{
node->doAction(action);
}

View File

@@ -100,7 +100,7 @@ public:
SoFCEnableSelectionAction (const SbBool& sel);
~SoFCEnableSelectionAction() override;
SbBool selection;
SbBool enabled;
static void initClass();
static void finish();
@@ -113,19 +113,19 @@ private:
};
/**
* The SoFCEnableHighlightAction class is used to inform an SoFCSelection node
* The SoFCEnablePreselectionAction class is used to inform an SoFCSelection node
* whether preselection is enabled or disabled.
* @author Werner Mayer
*/
class GuiExport SoFCEnableHighlightAction : public SoAction
class GuiExport SoFCEnablePreselectionAction : public SoAction
{
SO_ACTION_HEADER(SoFCEnableHighlightAction);
SO_ACTION_HEADER(SoFCEnablePreselectionAction);
public:
SoFCEnableHighlightAction (const SbBool& sel);
~SoFCEnableHighlightAction() override;
SoFCEnablePreselectionAction (const SbBool& sel);
~SoFCEnablePreselectionAction() override;
SbBool highlight;
SbBool enabled;
static void initClass();
static void finish();
@@ -164,7 +164,7 @@ private:
/**
* The SoFCHighlightColorAction class is used to inform an SoFCSelection node
* which preselection color is used.
* which highlight color is used.
* @author Werner Mayer
*/
class GuiExport SoFCHighlightColorAction : public SoAction

View File

@@ -312,9 +312,9 @@ SoFCUnifiedSelection::getPickedList(SoHandleEventAction* action, bool singlePick
void SoFCUnifiedSelection::doAction(SoAction *action)
{
if (action->getTypeId() == SoFCEnableHighlightAction::getClassTypeId()) {
auto enableHighlightAction = static_cast<SoFCEnableHighlightAction*>(action);
if (enableHighlightAction->highlight) {
if (action->getTypeId() == SoFCEnablePreselectionAction::getClassTypeId()) {
auto enablePreselectionAction = static_cast<SoFCEnablePreselectionAction*>(action);
if (enablePreselectionAction->enabled) {
this->preselectionMode = SoFCUnifiedSelection::AUTO;
}
else {
@@ -324,7 +324,7 @@ void SoFCUnifiedSelection::doAction(SoAction *action)
if (action->getTypeId() == SoFCEnableSelectionAction::getClassTypeId()) {
auto enableSelectionAction = static_cast<SoFCEnableSelectionAction*>(action);
if (enableSelectionAction->selection) {
if (enableSelectionAction->enabled) {
this->selectionMode = SoFCUnifiedSelection::ON;
}
else {

View File

@@ -185,7 +185,7 @@ void View3DSettings::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
}
else if (strcmp(Reason,"EnablePreselection") == 0) {
const ParameterGrp& rclGrp = ((ParameterGrp&)rCaller);
SoFCEnableHighlightAction cAct(rclGrp.GetBool("EnablePreselection", true));
SoFCEnablePreselectionAction cAct(rclGrp.GetBool("EnablePreselection", true));
for (auto _viewer : _viewers) {
cAct.apply(_viewer->getSceneGraph());
}