forked from qt-creator/qt-creator
QmlDesigner: Set text editor to modified if auxiliaryData is changed
The auxiliaryData is stored in a meta comment when saving. Therefore the document is modified, once an auxiliaryData is changed. Change-Id: If27015b7904754bab4e5d4d50939d3d55469cc6b Reviewed-by: Knud Dollereder <knud.dollereder@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
e3ac997fd4
commit
6be1632212
@@ -109,6 +109,8 @@ public:
|
||||
void reactivateTextMofifierChangeSignals();
|
||||
void deactivateTextMofifierChangeSignals();
|
||||
|
||||
void auxiliaryDataChanged(const ModelNode &node, const PropertyName &name, const QVariant &data) override;
|
||||
|
||||
Internal::ModelNodePositionStorage *positionStorage() const;
|
||||
|
||||
QList<DocumentMessage> warnings() const;
|
||||
|
@@ -387,6 +387,17 @@ void RewriterView::deactivateTextMofifierChangeSignals()
|
||||
textModifier()->deactivateChangeSignals();
|
||||
}
|
||||
|
||||
void RewriterView::auxiliaryDataChanged(const ModelNode &, const PropertyName &name, const QVariant &)
|
||||
{
|
||||
if (name.endsWith("@NodeInstance"))
|
||||
return;
|
||||
|
||||
if (name.endsWith("@Internal"))
|
||||
return;
|
||||
|
||||
m_textModifier->textDocument()->setModified(true);
|
||||
}
|
||||
|
||||
void RewriterView::applyModificationGroupChanges()
|
||||
{
|
||||
Q_ASSERT(transactionLevel == 0);
|
||||
|
Reference in New Issue
Block a user