Fixed name inconsistencies
This commit is contained in:
@@ -504,7 +504,7 @@ void GuiRootInstance::update()
|
|||||||
Instance * obj4 = this->findFirstChild("Rotate");
|
Instance * obj4 = this->findFirstChild("Rotate");
|
||||||
Instance * obj5 = this->findFirstChild("Tilt");
|
Instance * obj5 = this->findFirstChild("Tilt");
|
||||||
|
|
||||||
SelectionService* SelectionSvc = g_dataModel->getSelectionService();
|
SelectionService* getSelectionService = g_dataModel->getSelectionService();
|
||||||
|
|
||||||
if(obj != NULL && obj2 != NULL && obj3 != NULL && obj4 !=NULL && obj5 != NULL && obj6 != NULL)
|
if(obj != NULL && obj2 != NULL && obj3 != NULL && obj4 !=NULL && obj5 != NULL && obj6 != NULL)
|
||||||
{
|
{
|
||||||
@@ -520,8 +520,8 @@ void GuiRootInstance::update()
|
|||||||
button4->disabled = true;
|
button4->disabled = true;
|
||||||
button5->disabled = true;
|
button5->disabled = true;
|
||||||
button6->disabled = true;
|
button6->disabled = true;
|
||||||
for(size_t i = 0; i < SelectionSvc->getSelection().size(); i++)
|
for(size_t i = 0; i < getSelectionService->getSelection().size(); i++)
|
||||||
if(SelectionSvc->getSelection()[i]->canDelete)
|
if(getSelectionService->getSelection()[i]->canDelete)
|
||||||
{
|
{
|
||||||
button->disabled = false;
|
button->disabled = false;
|
||||||
button4->disabled = false;
|
button4->disabled = false;
|
||||||
@@ -529,11 +529,11 @@ void GuiRootInstance::update()
|
|||||||
button6->disabled = false;
|
button6->disabled = false;
|
||||||
|
|
||||||
|
|
||||||
if (SelectionSvc->getSelection().size() > 1){
|
if (getSelectionService->getSelection().size() > 1){
|
||||||
button2->disabled = false;
|
button2->disabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dynamic_cast<GroupInstance*>(SelectionSvc->getSelection()[i])){
|
if (dynamic_cast<GroupInstance*>(getSelectionService->getSelection()[i])){
|
||||||
button3->disabled = false;
|
button3->disabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
|
|
||||||
void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||||
{
|
{
|
||||||
SelectionService* SelectionSvc = g_dataModel->getSelectionService();
|
SelectionService* getSelectionService = g_dataModel->getSelectionService();
|
||||||
SoundService* SoundSvc = g_dataModel->getSoundService();
|
SoundService* getSoundService = g_dataModel->getSoundService();
|
||||||
|
|
||||||
bool cont = false;
|
bool cont = false;
|
||||||
for(size_t i = 0; i < SelectionSvc->getSelection().size(); i++)
|
for(size_t i = 0; i < getSelectionService->getSelection().size(); i++)
|
||||||
if(SelectionSvc->getSelection()[i]->canDelete)
|
if(getSelectionService->getSelection()[i]->canDelete)
|
||||||
{
|
{
|
||||||
cont = true;
|
cont = true;
|
||||||
break;
|
break;
|
||||||
@@ -21,19 +21,19 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
|||||||
if (cont)
|
if (cont)
|
||||||
{
|
{
|
||||||
if(button->disabled == false){
|
if(button->disabled == false){
|
||||||
SoundSvc->playSound(SoundSvc->findFirstChild("Ping"));
|
getSoundService->playSound(getSoundService->findFirstChild("Ping"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(button->name == "Duplicate")
|
if(button->name == "Duplicate")
|
||||||
{
|
{
|
||||||
std::vector<Instance*> newinst;
|
std::vector<Instance*> newinst;
|
||||||
for(size_t i = 0; i < SelectionSvc->getSelection().size(); i++)
|
for(size_t i = 0; i < getSelectionService->getSelection().size(); i++)
|
||||||
{
|
{
|
||||||
if(SelectionSvc->getSelection()[i]->canDelete)
|
if(getSelectionService->getSelection()[i]->canDelete)
|
||||||
{
|
{
|
||||||
Instance* tempinst = SelectionSvc->getSelection()[i];
|
Instance* tempinst = getSelectionService->getSelection()[i];
|
||||||
|
|
||||||
Instance* clonedInstance = SelectionSvc->getSelection()[i]->clone();
|
Instance* clonedInstance = getSelectionService->getSelection()[i]->clone();
|
||||||
|
|
||||||
if (clonedInstance->getClassName() == "PVInstance"){
|
if (clonedInstance->getClassName() == "PVInstance"){
|
||||||
PartInstance* Part = dynamic_cast<PartInstance*>(clonedInstance);
|
PartInstance* Part = dynamic_cast<PartInstance*>(clonedInstance);
|
||||||
@@ -43,35 +43,35 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
|||||||
newinst.push_back(clonedInstance);
|
newinst.push_back(clonedInstance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SelectionSvc->clearSelection();
|
getSelectionService->clearSelection();
|
||||||
SelectionSvc->addSelected(newinst);
|
getSelectionService->addSelected(newinst);
|
||||||
}
|
}
|
||||||
else if(button->name == "Group")
|
else if(button->name == "Group")
|
||||||
{
|
{
|
||||||
if (SelectionSvc->getSelection().size() > 1){
|
if (getSelectionService->getSelection().size() > 1){
|
||||||
GroupInstance * inst = new GroupInstance();
|
GroupInstance * inst = new GroupInstance();
|
||||||
inst->setParent(g_dataModel->getWorkspace());
|
inst->setParent(g_dataModel->getWorkspace());
|
||||||
for(size_t i = 0; i < SelectionSvc->getSelection().size(); i++)
|
for(size_t i = 0; i < getSelectionService->getSelection().size(); i++)
|
||||||
{
|
{
|
||||||
if(SelectionSvc->getSelection()[i]->canDelete)
|
if(getSelectionService->getSelection()[i]->canDelete)
|
||||||
{
|
{
|
||||||
SelectionSvc->getSelection()[i]->setParent(inst);
|
getSelectionService->getSelection()[i]->setParent(inst);
|
||||||
if(PartInstance* part = dynamic_cast<PartInstance*>(SelectionSvc->getSelection()[i]))
|
if(PartInstance* part = dynamic_cast<PartInstance*>(getSelectionService->getSelection()[i]))
|
||||||
{
|
{
|
||||||
inst->primaryPart = part;
|
inst->primaryPart = part;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SelectionSvc->clearSelection();
|
getSelectionService->clearSelection();
|
||||||
SelectionSvc->addSelected(inst);
|
getSelectionService->addSelected(inst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(button->name == "UnGroup")
|
else if(button->name == "UnGroup")
|
||||||
{
|
{
|
||||||
std::vector<Instance*> newinst;
|
std::vector<Instance*> newinst;
|
||||||
for(size_t i = 0; i < SelectionSvc->getSelection().size(); i++)
|
for(size_t i = 0; i < getSelectionService->getSelection().size(); i++)
|
||||||
{
|
{
|
||||||
Instance* selection = SelectionSvc->getSelection()[i];
|
Instance* selection = getSelectionService->getSelection()[i];
|
||||||
|
|
||||||
if(GroupInstance* model = dynamic_cast<GroupInstance*>(selection))
|
if(GroupInstance* model = dynamic_cast<GroupInstance*>(selection))
|
||||||
{
|
{
|
||||||
@@ -81,8 +81,8 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
|||||||
model = NULL;
|
model = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SelectionSvc->clearSelection();
|
getSelectionService->clearSelection();
|
||||||
SelectionSvc->addSelected(newinst);
|
getSelectionService->addSelected(newinst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user