mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
Added method ComponentPeer::setRepresentedFile() (and used this in the introjucer app)
This commit is contained in:
parent
f3abe0b246
commit
a50977e2f9
4 changed files with 25 additions and 0 deletions
|
|
@ -496,19 +496,25 @@ void ProjectContentComponent::updateMainWindowTitle()
|
|||
if (MainWindow* mw = findParentComponentOfClass<MainWindow>())
|
||||
{
|
||||
String title;
|
||||
File file;
|
||||
bool edited = false;
|
||||
|
||||
if (currentDocument != nullptr)
|
||||
{
|
||||
title = currentDocument->getName();
|
||||
edited = currentDocument->needsSaving();
|
||||
file = currentDocument->getFile();
|
||||
}
|
||||
|
||||
if (ComponentPeer* peer = mw->getPeer())
|
||||
{
|
||||
if (! peer->setDocumentEditedStatus (edited))
|
||||
if (edited)
|
||||
title << "*";
|
||||
|
||||
peer->setRepresentedFile (file);
|
||||
}
|
||||
|
||||
mw->updateTitle (title);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue