Added type "MultipleFullObject" to Selection

+ Fixed updating of the name of the manipulation pane
+ Changed logic of "Ctrl+A" inside the object list
This commit is contained in:
YuSanka 2018-11-08 15:45:55 +01:00
parent 96249792f6
commit aa3e4c294a
4 changed files with 96 additions and 38 deletions

View file

@ -1863,6 +1863,19 @@ void GLCanvas3D::Selection::_update_type()
else if ((selected_instances_count > 1) && (selected_instances_count * volumes_count == (unsigned int)m_list.size()))
m_type = MultipleFullInstance;
}
else
{
int sels_cntr = 0;
for (ObjectIdxsToInstanceIdxsMap::iterator it = m_cache.content.begin(); it != m_cache.content.end(); ++it)
{
const ModelObject* model_object = m_model->objects[it->first];
unsigned int volumes_count = (unsigned int)model_object->volumes.size();
unsigned int instances_count = (unsigned int)model_object->instances.size();
sels_cntr += volumes_count * instances_count;
}
if (sels_cntr == (unsigned int)m_list.size())
m_type = MultipleFullObject;
}
}
}
@ -1915,6 +1928,11 @@ void GLCanvas3D::Selection::_update_type()
std::cout << "selection type: SingleFullObject" << std::endl;
break;
}
case MultipleFullObject:
{
std::cout << "selection type: MultipleFullObject" << std::endl;
break;
}
case SingleFullInstance:
{
std::cout << "selection type: SingleFullInstance" << std::endl;