diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2018-07-05 17:05:02 +0300 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2018-07-26 09:54:08 +0000 |
commit | 8a95dd16d66a538d3ced36530180b3f15593a1ae (patch) | |
tree | d46b3df5722e743730b0474badff6ce9d6249232 /src/Authoring/Studio/Render/StudioRenderer.cpp | |
parent | 2f2112ffb74787ef3cbc905588075aaa1eb624d9 (diff) |
Add presentation id to the presentation settings panel
- The presentation settings panel appear after creating a new
presentation
- The presentation settings panel now show the presentation Id (for the
currently open presentation)
- Added logic to make sure the presentation id remains unique
- Added a command prompt option (--add) to add a presentation to project,
if the option is absent, a new project is created
- Added a context menu 'edit presentation id' action to the presentation
items in the project palette
- removed the sub presentations menu option and dialogue
- Added the ability to import a presentation. This will also import all
presentations related assets (images, models, fonts...etc). If an asset
already exists a message box is displayed so that the user can choose
whether to override or skip the file. The only missing thing is that
subpresentations are not imported. This part is to be discussed and/or
implemented in a separate task.
Change-Id: I9fa96227efa82b4cef90615f1f069530419db7b6
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Render/StudioRenderer.cpp')
-rw-r--r-- | src/Authoring/Studio/Render/StudioRenderer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Authoring/Studio/Render/StudioRenderer.cpp b/src/Authoring/Studio/Render/StudioRenderer.cpp index d4313b99..4ee579cf 100644 --- a/src/Authoring/Studio/Render/StudioRenderer.cpp +++ b/src/Authoring/Studio/Render/StudioRenderer.cpp @@ -588,15 +588,16 @@ struct SRendererImpl : public IStudioRenderer, { if (m_Context.mPtr && m_Context->GetTextRenderer()) { m_Context->GetTextRenderer()->ClearProjectFontDirectories(); - Q3DStudio::CString theDocDir = m_Doc.GetDocumentDirectory(); - if (theDocDir.Length()) { + Q3DStudio::CString projectPath = g_StudioApp.GetCore()->getProjectFile() + .getProjectPath().toCString(); + if (projectPath.Length()) { // Add the installed font folders from the res dir. Q3DStudio::CString thePath(Q3DStudio::CString::fromQString( resourcePath() + QStringLiteral("/Font"))); m_Context->GetTextRenderer()->AddSystemFontDirectory( m_Context->GetStringTable().RegisterStr(thePath.c_str())); m_Context->GetTextRenderer()->AddProjectFontDirectory( - m_Context->GetStringTable().RegisterStr(theDocDir.c_str())); + m_Context->GetStringTable().RegisterStr(projectPath.c_str())); } } } |