diff options
Diffstat (limited to 'src/Authoring')
3 files changed, 9 insertions, 5 deletions
diff --git a/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlModel.cpp b/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlModel.cpp index 5f72bdf0..06fc9ce6 100644 --- a/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlModel.cpp +++ b/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlModel.cpp @@ -1792,7 +1792,8 @@ void InspectorControlModel::setPropertyValue(long instance, int handle, const QV && ((newName.Find('/') != Q3DStudio::CString::ENDOFSTRING || newName.Find('#') != Q3DStudio::CString::ENDOFSTRING || newName.Find(':') != Q3DStudio::CString::ENDOFSTRING) - || m_suspendMaterialRename)) { + || m_suspendMaterialRename) + || newName.toQString().contains(QChar('.'))) { return; } qt3dsdm::Qt3DSDMInstanceHandle parentInstance = getBridge() diff --git a/src/Authoring/Qt3DStudio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp b/src/Authoring/Qt3DStudio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp index d71ef582..744c53a0 100644 --- a/src/Authoring/Qt3DStudio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp +++ b/src/Authoring/Qt3DStudio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp @@ -353,18 +353,17 @@ void Qt3DSDMTimelineItemBinding::SetName(const Q3DStudio::CString &inName) return; // Display warning dialog if user tried to enter an empty string - if (inName.IsEmpty()) { + if (inName.IsEmpty() || inName.toQString().contains(QChar('.'))) { QString theTitle = QObject::tr("Rename Object Error"); - QString theString = QObject::tr("Object name cannot be an empty string."); + QString theString = inName.IsEmpty() ? QObject::tr("Object name cannot be an empty string.") + : QObject::tr("Object name cannot contain a dot."); g_StudioApp.GetDialogs()->DisplayMessageBox(theTitle, theString, Qt3DSMessageBox::ICON_ERROR, false); - return; } CClientDataModelBridge *theBridge = m_StudioSystem->GetClientDataModelBridge(); const auto doc = g_StudioApp.GetCore()->GetDoc(); - // Display warning if the name and path are the same as the material container if (theBridge->GetParentInstance(m_DataHandle) == doc->GetSceneInstance() && inName.toQString() == theBridge->getMaterialContainerName()) { diff --git a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTreeLabel.cpp b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTreeLabel.cpp index a5431b14..7428c47c 100644 --- a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTreeLabel.cpp +++ b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTreeLabel.cpp @@ -168,6 +168,10 @@ void RowTreeLabel::validateLabel() emit labelChanged(""); setLabel(m_label); return; + } else if (text.contains(QChar('.'))) { + emit labelChanged("."); + setLabel(m_label); + return; } setLabel(text); |