forked from qt-creator/qt-creator
QmlDesigner: Trim state name
States should never have trailing white spaces. Change-Id: I67dc08e12fa042a237ede3d2d0247e6ea2b55eff Reviewed-by: Aleksei German <aleksei.german@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -298,7 +298,7 @@ void StatesEditorView::renameState(int internalNodeId, const QString &newName)
|
|||||||
setCurrentState(baseState());
|
setCurrentState(baseState());
|
||||||
const bool updateDefault = state.isDefault();
|
const bool updateDefault = state.isDefault();
|
||||||
|
|
||||||
state.setName(newName);
|
state.setName(newName.trimmed());
|
||||||
|
|
||||||
if (updateDefault)
|
if (updateDefault)
|
||||||
state.setAsDefault();
|
state.setAsDefault();
|
||||||
|
Reference in New Issue
Block a user