Skip to content

Commit

Permalink
Console and SourceView are set to read-only now
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Jun 26, 2017
1 parent 7942b01 commit 767386e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libs/wxutil/ConsoleView.cpp
Expand Up @@ -7,7 +7,7 @@ namespace wxutil
{

ConsoleView::ConsoleView(wxWindow* parent) :
wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH2),
wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH2|wxTE_READONLY),
_errorAttr(*wxRED),
_warningAttr(wxColour(128, 128, 0)),
_standardAttr(*wxBLACK)
Expand Down
3 changes: 3 additions & 0 deletions radiant/ui/common/ShaderDefinitionView.cpp
Expand Up @@ -80,7 +80,10 @@ void ShaderDefinitionView::update()
definition += material->getDefinition();
definition += "\n\r}";

// Value Updates are only possible when read-only is false
_view->SetReadOnly(false);
_view->SetValue(definition);
_view->SetReadOnly(true);
}

void ShaderDefinitionView::ShowDialog(const std::string& shaderName)
Expand Down

0 comments on commit 767386e

Please sign in to comment.