+ allow to create a compound from a single part object
This commit is contained in:
parent
60e63e12d6
commit
ada32f936a
|
@ -605,9 +605,9 @@ CmdPartCompound::CmdPartCompound()
|
||||||
void CmdPartCompound::activated(int iMsg)
|
void CmdPartCompound::activated(int iMsg)
|
||||||
{
|
{
|
||||||
unsigned int n = getSelection().countObjectsOfType(Part::Feature::getClassTypeId());
|
unsigned int n = getSelection().countObjectsOfType(Part::Feature::getClassTypeId());
|
||||||
if (n < 2) {
|
if (n < 1) {
|
||||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||||
QObject::tr("Select two shapes or more, please."));
|
QObject::tr("Select one shape or more, please."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -632,7 +632,7 @@ void CmdPartCompound::activated(int iMsg)
|
||||||
|
|
||||||
bool CmdPartCompound::isActive(void)
|
bool CmdPartCompound::isActive(void)
|
||||||
{
|
{
|
||||||
return getSelection().countObjectsOfType(Part::Feature::getClassTypeId())>=2;
|
return getSelection().countObjectsOfType(Part::Feature::getClassTypeId())>=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
Loading…
Reference in New Issue
Block a user