diff --git a/src/Editor/WorldEditor/WEditorProperties.cpp b/src/Editor/WorldEditor/WEditorProperties.cpp index 802ed9ef..b67a9221 100644 --- a/src/Editor/WorldEditor/WEditorProperties.cpp +++ b/src/Editor/WorldEditor/WEditorProperties.cpp @@ -2,11 +2,8 @@ #include "Editor/Undo/CEditScriptPropertyCommand.h" #include -WEditorProperties::WEditorProperties(QWidget *pParent /*= 0*/) +WEditorProperties::WEditorProperties(QWidget *pParent) : QWidget(pParent) - , mpEditor(nullptr) - , mpDisplayNode(nullptr) - , mHasEditedName(false) { mpInstanceInfoLabel = new QLabel; mpInstanceInfoLabel->setText("[No selection]"); diff --git a/src/Editor/WorldEditor/WEditorProperties.h b/src/Editor/WorldEditor/WEditorProperties.h index eda69059..8504def4 100644 --- a/src/Editor/WorldEditor/WEditorProperties.h +++ b/src/Editor/WorldEditor/WEditorProperties.h @@ -14,8 +14,8 @@ class WEditorProperties : public QWidget { Q_OBJECT - CWorldEditor* mpEditor; - CSceneNode* mpDisplayNode; + CWorldEditor* mpEditor = nullptr; + CSceneNode* mpDisplayNode = nullptr; QVBoxLayout* mpMainLayout; @@ -30,10 +30,11 @@ class WEditorProperties : public QWidget QComboBox* mpLayersComboBox; QHBoxLayout* mpLayersLayout; - bool mHasEditedName; + bool mHasEditedName = false; public: - WEditorProperties(QWidget* pParent = 0); + explicit WEditorProperties(QWidget* pParent = nullptr); + void SyncToEditor(CWorldEditor* pEditor); void SetLayerComboBox();