Browse Source

Projucer: Ensure that the default project name is used when no name is set

tags/2021-05-28
ed 7 years ago
parent
commit
6eeaa4036c
3 changed files with 14 additions and 7 deletions
  1. +4
    -4
      extras/Projucer/Source/Application/jucer_MainWindow.cpp
  2. +9
    -3
      extras/Projucer/Source/Project/jucer_Project.cpp
  3. +1
    -0
      extras/Projucer/Source/Project/jucer_Project.h

+ 4
- 4
extras/Projucer/Source/Application/jucer_MainWindow.cpp View File

@@ -584,12 +584,12 @@ bool MainWindow::perform (const InvocationInfo& info)
return true; return true;
} }
void MainWindow::valueChanged (Value& v)
void MainWindow::valueChanged (Value&)
{ {
if (v == Value())
setName ("Projucer");
if (currentProject != nullptr)
setName (currentProject->getProjectNameString() + " - Projucer");
else else
setName (projectNameValue.toString() + " - Projucer");
setName ("Projucer");
} }
//============================================================================== //==============================================================================


+ 9
- 3
extras/Projucer/Source/Project/jucer_Project.cpp View File

@@ -82,8 +82,14 @@ const char* Project::projectFileExtension = ".jucer";
//============================================================================== //==============================================================================
void Project::setTitle (const String& newTitle) void Project::setTitle (const String& newTitle)
{ {
projectRoot.setProperty (Ids::name, newTitle, getUndoManager());
getMainGroup().getNameValue() = newTitle;
projectNameValue = newTitle;
updateTitle();
}
void Project::updateTitle()
{
getMainGroup().getNameValue() = getProjectNameString();
bundleIdentifierValue.setDefault (getDefaultBundleIdentifierString()); bundleIdentifierValue.setDefault (getDefaultBundleIdentifierString());
pluginAAXIdentifierValue.setDefault (getDefaultAAXIdentifierString()); pluginAAXIdentifierValue.setDefault (getDefaultAAXIdentifierString());
@@ -547,7 +553,7 @@ void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& prope
} }
else if (property == Ids::name) else if (property == Ids::name)
{ {
setTitle (projectRoot [Ids::name]);
updateTitle();
} }
else if (property == Ids::defines) else if (property == Ids::defines)
{ {


+ 1
- 0
extras/Projucer/Source/Project/jucer_Project.h View File

@@ -389,6 +389,7 @@ private:
void createAudioPluginPropertyEditors (PropertyListBuilder& props); void createAudioPluginPropertyEditors (PropertyListBuilder& props);
//============================================================================== //==============================================================================
void updateTitle();
void updateProjectSettings(); void updateProjectSettings();
ValueTree getConfigurations() const; ValueTree getConfigurations() const;
ValueTree getConfigNode(); ValueTree getConfigNode();


Loading…
Cancel
Save