QmlDesigner: Change 3D grid stepping immediately on interval change

Changes in position snap interval cause visible changes, as helper
grid stepping is tied to this interval, so we notify puppet
about every change to snap interval rather than just notifying the
value when popup closes.

Fixes: QDS-10750
Change-Id: If84f79530634c81f1d17f49d21929a442ff544f1
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
Miikka Heikkinen
2023-09-25 15:04:10 +03:00
parent 02abf29fa5
commit d493563adb

View File

@@ -966,8 +966,15 @@ void Edit3DView::createEdit3DActions()
snapToggleTrigger); snapToggleTrigger);
SelectionContextOperation snapConfigTrigger = [this](const SelectionContext &) { SelectionContextOperation snapConfigTrigger = [this](const SelectionContext &) {
if (!m_snapConfiguration) if (!m_snapConfiguration) {
m_snapConfiguration = new SnapConfiguration(this); m_snapConfiguration = new SnapConfiguration(this);
connect(m_snapConfiguration.data(), &SnapConfiguration::posIntChanged,
this, [this]() {
// Notify every change of position interval as that causes visible changes in grid
rootModelNode().setAuxiliaryData(edit3dSnapPosIntProperty,
m_snapConfiguration->posInt());
});
}
m_snapConfiguration->showConfigDialog(resolveToolbarPopupPos(m_snapConfigAction.get())); m_snapConfiguration->showConfigDialog(resolveToolbarPopupPos(m_snapConfigAction.get()));
}; };