QmlDesigner: Disable shortcut if document did not change

Change-Id: I95f67379d507ab599d2435cc042f96fc28d8d7cd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Thomas Hartmann
2018-05-15 17:22:14 +02:00
committed by Alessandro Portale
parent e3fb057397
commit 5912a93fd5

View File

@@ -977,10 +977,12 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
QList<DocumentMessage> warnings; QList<DocumentMessage> warnings;
if (Document::MutablePtr doc = createParsedDocument(url, data, &errors)) { if (Document::MutablePtr doc = createParsedDocument(url, data, &errors)) {
/* We cannot do this since changes to other documents do have side effects on the current document
if (m_document && (m_document->fingerprint() == doc->fingerprint())) { if (m_document && (m_document->fingerprint() == doc->fingerprint())) {
setActive(false); setActive(false);
return true; return true;
} }
*/
snapshot.insert(doc); snapshot.insert(doc);
m_document = doc; m_document = doc;