Commit 50f0644c authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Designer: Fix displaying of 'modified' state after saving.

Emit an IEditor::changed() after saving to force an update
of the OpenEditorsModel.
parent 5567a018
......@@ -81,6 +81,8 @@ FormWindowEditor::FormWindowEditor(Internal::DesignerXmlEditor *editor,
connect(form, SIGNAL(changed()), this, SIGNAL(changed()));
// Revert to saved/load externally modified files
connect(&(d->m_file), SIGNAL(reload(QString)), this, SLOT(slotOpen(QString)));
// Force update of open editors model.
connect(&(d->m_file), SIGNAL(saved()), this, SIGNAL(changed()));
......@@ -83,6 +83,7 @@ bool FormWindowFile::save(const QString &name /*= QString()*/)
emit setDisplayName(fi.fileName());
emit changed();
emit saved();
return true;
......@@ -50,14 +50,14 @@ public:
explicit FormWindowFile(QDesignerFormWindowInterface *form, QObject *parent = 0);
// IFile
bool save(const QString &fileName = QString());
QString fileName() const;
bool isModified() const;
bool isReadOnly() const;
bool isSaveAsAllowed() const;
void modified(Core::IFile::ReloadBehavior *behavior);
QString defaultPath() const;
QString suggestedFileName() const;
virtual bool save(const QString &fileName = QString());
virtual QString fileName() const;
virtual bool isModified() const;
virtual bool isReadOnly() const;
virtual bool isSaveAsAllowed() const;
virtual void modified(Core::IFile::ReloadBehavior *behavior);
virtual QString defaultPath() const;
virtual QString suggestedFileName() const;
virtual QString mimeType() const;
// Internal
......@@ -70,6 +70,7 @@ public:
// Internal
void saved();
void reload(const QString &);
void setDisplayName(const QString &);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment