QmlDesigner: Break dependency to View3DActionCommand

The node instance view and his commands should be not called directly
from other views. There are special classes QmlItem which can do it but
every change should go through the model.

Change-Id: I734e5538d7f6ecb07d736912f647c5eb92dc7631
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Marco Bubke
2022-09-14 11:46:08 +02:00
parent 2bfc8173e5
commit 8aee8df4df
21 changed files with 475 additions and 279 deletions

View File

@@ -130,9 +130,8 @@ Edit3DWidget::Edit3DWidget(Edit3DView *view)
view->setSeeker(seeker);
seeker->setToolTip(QLatin1String("Seek particle system time when paused."));
QObject::connect(seeker, &SeekerSlider::positionChanged, [seeker](){
QmlDesignerPlugin::instance()->viewManager().nodeInstanceView()
->view3DAction(View3DSeekActionCommand(seeker->position()));
QObject::connect(seeker, &SeekerSlider::positionChanged, [seeker, view]() {
view->emitView3DAction(View3DActionType::ParticlesSeek, seeker->position());
});
// Onboarding label contains instructions for new users how to get 3D content into the project