Gui: add convenience functions to SelectionFilterGate
This commit is contained in:
@@ -63,7 +63,7 @@ public:
|
||||
bool canSelect;
|
||||
|
||||
EdgeSelection()
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr)
|
||||
: Gui::SelectionFilterGate(nullPointer())
|
||||
{
|
||||
canSelect = false;
|
||||
}
|
||||
@@ -352,7 +352,7 @@ void DlgExtrusion::autoSolid()
|
||||
void DlgExtrusion::findShapes()
|
||||
{
|
||||
App::Document* activeDoc = App::GetApplication().getActiveDocument();
|
||||
if (!activeDoc)
|
||||
if (!activeDoc)
|
||||
return;
|
||||
Gui::Document* activeGui = Gui::Application::Instance->getDocument(activeDoc);
|
||||
this->document = activeDoc->getName();
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace PartGui {
|
||||
App::DocumentObject*& object;
|
||||
public:
|
||||
EdgeFaceSelection(App::DocumentObject*& obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr), allowEdge(true), object(obj)
|
||||
: Gui::SelectionFilterGate(nullPointer()), allowEdge(true), object(obj)
|
||||
{
|
||||
}
|
||||
void selectEdges()
|
||||
@@ -528,7 +528,7 @@ void DlgFilletEdges::toggleCheckState(const QModelIndex& index)
|
||||
void DlgFilletEdges::findShapes()
|
||||
{
|
||||
App::Document* activeDoc = App::GetApplication().getActiveDocument();
|
||||
if (!activeDoc)
|
||||
if (!activeDoc)
|
||||
return;
|
||||
|
||||
std::vector<App::DocumentObject*> objs = activeDoc->getObjectsOfType
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
bool canSelect;
|
||||
|
||||
EdgeSelection()
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr)
|
||||
: Gui::SelectionFilterGate(nullPointer())
|
||||
{
|
||||
canSelect = false;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
bool canSelect;
|
||||
|
||||
FaceSelection()
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr)
|
||||
: Gui::SelectionFilterGate(nullPointer())
|
||||
{
|
||||
canSelect = false;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
bool canSelect;
|
||||
|
||||
EdgeSelection()
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr)
|
||||
: Gui::SelectionFilterGate(nullPointer())
|
||||
{
|
||||
canSelect = false;
|
||||
}
|
||||
@@ -329,7 +329,7 @@ void DlgRevolution::keyPressEvent(QKeyEvent* ke)
|
||||
void DlgRevolution::findShapes()
|
||||
{
|
||||
App::Document* activeDoc = App::GetApplication().getActiveDocument();
|
||||
if (!activeDoc)
|
||||
if (!activeDoc)
|
||||
return;
|
||||
Gui::Document* activeGui = Gui::Application::Instance->getDocument(activeDoc);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace PartGui {
|
||||
enum Type {VERTEX, EDGE, FACE, ALL};
|
||||
Type mode;
|
||||
ShapeSelection()
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr), mode(ALL)
|
||||
: Gui::SelectionFilterGate(nullPointer()), mode(ALL)
|
||||
{
|
||||
}
|
||||
void setMode(Type mode)
|
||||
@@ -172,7 +172,7 @@ void ShapeBuilderWidget::on_createButton_clicked()
|
||||
{
|
||||
int mode = d->bg.checkedId();
|
||||
Gui::Document* doc = Gui::Application::Instance->activeDocument();
|
||||
if (!doc)
|
||||
if (!doc)
|
||||
return;
|
||||
|
||||
try {
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
{
|
||||
public:
|
||||
EdgeSelection()
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr)
|
||||
: Gui::SelectionFilterGate(nullPointer())
|
||||
{
|
||||
}
|
||||
bool allow(App::Document* /*pDoc*/, App::DocumentObject*pObj, const char*sSubName)
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
const App::DocumentObject* object;
|
||||
public:
|
||||
FaceSelection(const App::DocumentObject* obj)
|
||||
: Gui::SelectionFilterGate((Gui::SelectionFilter*)nullptr), object(obj)
|
||||
: Gui::SelectionFilterGate(nullPointer()), object(obj)
|
||||
{
|
||||
}
|
||||
bool allow(App::Document* /*pDoc*/, App::DocumentObject*pObj, const char*sSubName)
|
||||
|
||||
Reference in New Issue
Block a user