Skip to content

Commit 0d1efd6

Browse files
committed
Don't need to disable controls on creation anymore - whatever was enabling them doesn't anymore
1 parent 1fdf944 commit 0d1efd6

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Editor/EditorManager.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,15 @@ namespace RTEGUI {
136136
s_SelectionInfo.ClearSelection();
137137
m_PropertyPage->ClearValues();
138138
}
139-
140139
std::string controlClass = editorEvent.GetControl()->GetName().substr(2, std::string::npos);
140+
std::string controlName = GenerateControlName(controlClass);
141+
141142
GUIControl *parent = m_RootControl;
142143

143144
// If the focused control is a container set it as parent so controls are added to it
144145
if (s_SelectionInfo.GetControl() && s_SelectionInfo.GetControl()->IsContainer()) { parent = s_SelectionInfo.GetControl(); }
145146

146-
std::string name = GenerateControlName(controlClass);
147-
148-
if (parent) {
149-
m_WorkspaceManager->AddControl(name, controlClass, parent, 0, 0, -1, -1);
150-
m_WorkspaceManager->GetControl(name)->SetEnabled(false);
151-
}
147+
if (parent) { m_WorkspaceManager->AddControl(controlName, controlClass, parent, 0, 0, -1, -1); }
152148

153149
UpdateCollectionBoxList();
154150
UpdateCollectionBoxChildrenList(dynamic_cast<GUICollectionBox *>(parent));

0 commit comments

Comments
 (0)