Improve roatation tool.
It's not really logical for a user that a center of rotation no need to select. To fix this issue we just silently remove it from the list. --HG-- branch : develop
This commit is contained in:
parent
4fdfcfc11e
commit
1a231872b5
|
@ -242,16 +242,19 @@ void DialogRotation::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
{
|
{
|
||||||
if (type == SceneObject::Point)
|
if (type == SceneObject::Point)
|
||||||
{
|
{
|
||||||
|
VisToolRotation *operation = qobject_cast<VisToolRotation *>(vis);
|
||||||
|
SCASSERT(operation != nullptr)
|
||||||
|
|
||||||
if (objects.contains(id))
|
if (objects.contains(id))
|
||||||
{
|
{
|
||||||
emit ToolTip(tr("Select origin point that is not part of the list of objects"));
|
// It's not really logical for a user that a center of rotation no need to select.
|
||||||
return;
|
// To fix this issue we just silently remove it from the list.
|
||||||
|
objects.removeOne(id);
|
||||||
|
operation->SetObjects(objects.toVector());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SetObject(id, ui->comboBoxOriginPoint, ""))
|
if (SetObject(id, ui->comboBoxOriginPoint, ""))
|
||||||
{
|
{
|
||||||
VisToolRotation *operation = qobject_cast<VisToolRotation *>(vis);
|
|
||||||
SCASSERT(operation != nullptr)
|
|
||||||
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
|
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
|
||||||
SCASSERT(window != nullptr)
|
SCASSERT(window != nullptr)
|
||||||
connect(operation, &Visualization::ToolTip, window, &VAbstractMainWindow::ShowToolTip);
|
connect(operation, &Visualization::ToolTip, window, &VAbstractMainWindow::ShowToolTip);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user