Gui: rename methods of SelectionObserver to clarify intention in client code

This commit is contained in:
wmayer
2021-12-07 14:17:07 +01:00
parent ce88fa2052
commit ca5c799ce2
18 changed files with 123 additions and 126 deletions

View File

@@ -406,8 +406,6 @@ void TaskExtrudeParameters::onDirectionCBChanged(int num)
// or we are normal to a face
App::PropertyLinkSub& lnk = *(axesInList[num]);
if (num == DirectionModes::Select) {
// enter reference selection mode
this->blockConnection(false);
// to distinguish that this is the direction selection
selectionFace = false;
setDirectionMode(num);

View File

@@ -304,7 +304,7 @@ void TaskLoftParameters::exitSelectionMode()
{
selectionMode = none;
Gui::Selection().clearSelection();
this->blockConnection(true);
this->blockSelection(true);
}
void TaskLoftParameters::changeEvent(QEvent * /*e*/)
@@ -327,7 +327,7 @@ void TaskLoftParameters::onProfileButton(bool checked)
clearButtons(refProfile);
Gui::Selection().clearSelection();
selectionMode = refProfile;
this->blockConnection(false);
this->blockSelection(false);
//static_cast<ViewProviderLoft*>(vp)->highlightReferences(true, true);
}
}
@@ -338,7 +338,7 @@ void TaskLoftParameters::onRefButtonAdd(bool checked)
clearButtons(refAdd);
Gui::Selection().clearSelection();
selectionMode = refAdd;
this->blockConnection(false);
this->blockSelection(false);
//static_cast<ViewProviderLoft*>(vp)->highlightReferences(true, true);
}
}
@@ -349,7 +349,7 @@ void TaskLoftParameters::onRefButtonRemove(bool checked)
clearButtons(refRemove);
Gui::Selection().clearSelection();
selectionMode = refRemove;
this->blockConnection(false);
this->blockSelection(false);
//static_cast<ViewProviderLoft*>(vp)->highlightReferences(true, true);
}
}

View File

@@ -149,7 +149,7 @@ TaskPipeParameters::TaskPipeParameters(ViewProviderPipe *PipeView, bool /*newObj
ui->comboBoxTransition->setCurrentIndex(pipe->Transition.getValue());
updateUI();
this->blockConnection(false);
this->blockSelection(false);
}
TaskPipeParameters::~TaskPipeParameters()
@@ -664,7 +664,7 @@ TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView, bool /*newO
// should be called after panel has become visible
QMetaObject::invokeMethod(this, "updateUI", Qt::QueuedConnection,
QGenericReturnArgument(), Q_ARG(int,pipe->Mode.getValue()));
this->blockConnection(false);
this->blockSelection(false);
}
TaskPipeOrientation::~TaskPipeOrientation()
@@ -960,7 +960,7 @@ TaskPipeScaling::TaskPipeScaling(ViewProviderPipe* PipeView, bool /*newObj*/, QW
// should be called after panel has become visible
QMetaObject::invokeMethod(this, "updateUI", Qt::QueuedConnection,
QGenericReturnArgument(), Q_ARG(int,pipe->Transformation.getValue()));
this->blockConnection(false);
this->blockSelection(false);
}
TaskPipeScaling::~TaskPipeScaling()

View File

@@ -64,7 +64,7 @@ TaskSketchBasedParameters::TaskSketchBasedParameters(PartDesignGui::ViewProvider
: TaskFeatureParameters(vp, parent, pixmapname, parname)
{
// disable selection
this->blockConnection(true);
this->blockSelection(true);
}
const QString TaskSketchBasedParameters::onAddSelection(const Gui::SelectionChanges& msg)
@@ -123,14 +123,14 @@ void TaskSketchBasedParameters::onSelectReference(AllowSelectionFlags allow) {
if (AllowSelectionFlags::Int(allow) != int(AllowSelection::NONE)) {
startReferenceSelection(pcSketchBased, prevSolid);
this->blockConnection(false);
this->blockSelection(false);
Gui::Selection().clearSelection();
Gui::Selection().addSelectionGate(new ReferenceSelection(prevSolid, allow));
}
else {
Gui::Selection().rmvSelectionGate();
finishReferenceSelection(pcSketchBased, prevSolid);
this->blockConnection(true);
this->blockSelection(true);
}
}
}