allow to create SelectionObject from SelectionChanges structure
This commit is contained in:
@@ -31,8 +31,9 @@
|
||||
#include <Base/Interpreter.h>
|
||||
|
||||
#include "SelectionObject.h"
|
||||
#include "SelectionObjectPy.h"
|
||||
#include "Selection.h"
|
||||
#include "Application.h"
|
||||
#include <Gui/SelectionObjectPy.h>
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
@@ -43,6 +44,17 @@ SelectionObject::SelectionObject()
|
||||
{
|
||||
}
|
||||
|
||||
SelectionObject::SelectionObject(const Gui::SelectionChanges& msg)
|
||||
{
|
||||
FeatName = msg.pObjectName ? msg.pObjectName : "";
|
||||
DocName = msg.pDocName ? msg.pDocName : "";
|
||||
TypeName = msg.pTypeName ? msg.pTypeName : "";
|
||||
if (msg.pSubName) {
|
||||
SubNames.push_back(msg.pSubName);
|
||||
SelPoses.push_back(Base::Vector3d(msg.x, msg.y, msg.z));
|
||||
}
|
||||
}
|
||||
|
||||
SelectionObject::SelectionObject(App::DocumentObject* obj)
|
||||
{
|
||||
FeatName = obj->getNameInDocument();
|
||||
|
||||
Reference in New Issue
Block a user