Gui: Improve transform UI responsivness
This introduces much faster CenterOfMassProvider#supports method that can be used as cheap pre-check to see if the object supplied could have the center of mass and so delay the domputation to a moment where it is actually needed.
This commit is contained in:
committed by
Chris Hennes
parent
5f0d99f4f3
commit
88d721b14c
@@ -173,7 +173,7 @@ void TaskTransform::loadPlacementModeItems() const
|
||||
QVariant::fromValue(PlacementMode::ObjectOrigin)
|
||||
);
|
||||
|
||||
if (centerOfMassProvider->ofDocumentObject(vp->getObject()).has_value()) {
|
||||
if (centerOfMassProvider->supports(vp->getObject())) {
|
||||
ui->placementComboBox->addItem(
|
||||
tr("Center of mass / centroid"),
|
||||
QVariant::fromValue(PlacementMode::Centroid)
|
||||
|
||||
Reference in New Issue
Block a user