Skip to content

Commit

Permalink
#5567: Allow switching through notebook tabs for read-only materials
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Apr 2, 2021
1 parent da2f609 commit 9f781fb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions radiant/ui/materials/editor/MaterialEditor.cpp
Expand Up @@ -1756,10 +1756,15 @@ void MaterialEditor::updateMaterialPropertiesFromMaterial()

bool materialCanBeModified = _material && GlobalMaterialManager().materialCanBeModified(_material->getName());

getControl<wxPanel>("BasicEditorPanel")->Enable(materialCanBeModified);
getControl<wxPanel>("MaterialNameAndDescription")->Enable(materialCanBeModified);
getControl<wxPanel>("MaterialEditorStageSettingsPanel")->Enable(materialCanBeModified);
getControl<wxPanel>("MaterialEditorImagePanel")->Enable(materialCanBeModified);

getControl<wxPanel>("BasicEditorPanel")->Enable(materialCanBeModified);
// Enable/disable the settings pages
for (const auto& pair : _notebookPages)
{
pair.second.first->Enable(materialCanBeModified);
}

auto nameEntry = getControl<wxTextCtrl>("MaterialName");
nameEntry->Enable(materialCanBeModified);
Expand Down

0 comments on commit 9f781fb

Please sign in to comment.