PD: enable selection only on request and disable it after selecting an object
This commit is contained in:
@@ -560,8 +560,6 @@ void TaskExtrudeParameters::getReferenceAxis(App::DocumentObject*& obj, std::vec
|
||||
|
||||
void TaskExtrudeParameters::onButtonFace(const bool pressed)
|
||||
{
|
||||
this->blockConnection(!pressed);
|
||||
|
||||
// to distinguish that this is the direction selection
|
||||
selectionFace = true;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include "TaskSketchBasedParameters.h"
|
||||
#include "ReferenceSelection.h"
|
||||
|
||||
Q_DECLARE_METATYPE(App::PropertyLinkSubList::SubSet);
|
||||
Q_DECLARE_METATYPE(App::PropertyLinkSubList::SubSet)
|
||||
|
||||
using namespace PartDesignGui;
|
||||
using namespace Gui;
|
||||
@@ -304,6 +304,7 @@ void TaskLoftParameters::exitSelectionMode()
|
||||
{
|
||||
selectionMode = none;
|
||||
Gui::Selection().clearSelection();
|
||||
this->blockConnection(true);
|
||||
}
|
||||
|
||||
void TaskLoftParameters::changeEvent(QEvent * /*e*/)
|
||||
@@ -326,6 +327,7 @@ void TaskLoftParameters::onProfileButton(bool checked)
|
||||
clearButtons(refProfile);
|
||||
Gui::Selection().clearSelection();
|
||||
selectionMode = refProfile;
|
||||
this->blockConnection(false);
|
||||
//static_cast<ViewProviderLoft*>(vp)->highlightReferences(true, true);
|
||||
}
|
||||
}
|
||||
@@ -336,6 +338,7 @@ void TaskLoftParameters::onRefButtonAdd(bool checked)
|
||||
clearButtons(refAdd);
|
||||
Gui::Selection().clearSelection();
|
||||
selectionMode = refAdd;
|
||||
this->blockConnection(false);
|
||||
//static_cast<ViewProviderLoft*>(vp)->highlightReferences(true, true);
|
||||
}
|
||||
}
|
||||
@@ -346,6 +349,7 @@ void TaskLoftParameters::onRefButtonRemove(bool checked)
|
||||
clearButtons(refRemove);
|
||||
Gui::Selection().clearSelection();
|
||||
selectionMode = refRemove;
|
||||
this->blockConnection(false);
|
||||
//static_cast<ViewProviderLoft*>(vp)->highlightReferences(true, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#include "Utils.h"
|
||||
#include "TaskFeaturePick.h"
|
||||
|
||||
Q_DECLARE_METATYPE(App::PropertyLinkSubList::SubSet);
|
||||
Q_DECLARE_METATYPE(App::PropertyLinkSubList::SubSet)
|
||||
|
||||
using namespace PartDesignGui;
|
||||
using namespace Gui;
|
||||
@@ -149,6 +149,7 @@ TaskPipeParameters::TaskPipeParameters(ViewProviderPipe *PipeView, bool /*newObj
|
||||
ui->comboBoxTransition->setCurrentIndex(pipe->Transition.getValue());
|
||||
|
||||
updateUI();
|
||||
this->blockConnection(false);
|
||||
}
|
||||
|
||||
TaskPipeParameters::~TaskPipeParameters()
|
||||
@@ -663,6 +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);
|
||||
}
|
||||
|
||||
TaskPipeOrientation::~TaskPipeOrientation()
|
||||
@@ -958,6 +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);
|
||||
}
|
||||
|
||||
TaskPipeScaling::~TaskPipeScaling()
|
||||
|
||||
@@ -63,7 +63,8 @@ TaskSketchBasedParameters::TaskSketchBasedParameters(PartDesignGui::ViewProvider
|
||||
const std::string& pixmapname, const QString& parname)
|
||||
: TaskFeatureParameters(vp, parent, pixmapname, parname)
|
||||
{
|
||||
|
||||
// disable selection
|
||||
this->blockConnection(true);
|
||||
}
|
||||
|
||||
const QString TaskSketchBasedParameters::onAddSelection(const Gui::SelectionChanges& msg)
|
||||
@@ -122,12 +123,14 @@ void TaskSketchBasedParameters::onSelectReference(AllowSelectionFlags allow) {
|
||||
|
||||
if (AllowSelectionFlags::Int(allow) != int(AllowSelection::NONE)) {
|
||||
startReferenceSelection(pcSketchBased, prevSolid);
|
||||
this->blockConnection(false);
|
||||
Gui::Selection().clearSelection();
|
||||
Gui::Selection().addSelectionGate(new ReferenceSelection(prevSolid, allow));
|
||||
}
|
||||
else {
|
||||
Gui::Selection().rmvSelectionGate();
|
||||
finishReferenceSelection(pcSketchBased, prevSolid);
|
||||
this->blockConnection(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user