Skip to content

Commit

Permalink
#5567: Prevent stage hiding 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 c29cb37 commit da2f609
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion radiant/ui/materials/editor/MaterialEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2402,7 +2402,11 @@ void MaterialEditor::toggleSelectedStage()

wxutil::TreeModel::Row row(_stageView->GetSelection(), *_stageList);

if (!_material || row[STAGE_COLS().global].getBool()) return;
if (!_material || !GlobalMaterialManager().materialCanBeModified(_material->getName()) ||
row[STAGE_COLS().global].getBool())
{
return;
}

auto stage = getEditableStageForSelection();

Expand Down

0 comments on commit da2f609

Please sign in to comment.