diff --git a/radiantcore/selection/algorithm/General.cpp b/radiantcore/selection/algorithm/General.cpp index 7f1736ea83..51faff85ef 100644 --- a/radiantcore/selection/algorithm/General.cpp +++ b/radiantcore/selection/algorithm/General.cpp @@ -1005,9 +1005,12 @@ void registerCommands() GlobalCommandSystem().addCommand("ExportSelectedAsCollisionModel", createCMFromSelection, { cmd::ARGTYPE_STRING }); - GlobalCommandSystem().addCommand("CreateDecalsForFaces", createDecalsForSelectedFaces); + GlobalCommandSystem().addWithCheck( + "CreateDecalsForFaces", [](const cmd::ArgumentList&) { createDecalsForSelectedFaces(); }, + [] { return !FaceInstance::Selection().empty(); } + ); - GlobalCommandSystem().addCommand("Copy", clipboard::copy); + GlobalCommandSystem().addCommand("Copy", clipboard::copy); GlobalCommandSystem().addCommand("Cut", clipboard::cut); GlobalCommandSystem().addCommand("Paste", clipboard::paste); GlobalCommandSystem().addCommand("PasteToCamera", clipboard::pasteToCamera); diff --git a/radiantcore/selection/algorithm/Primitives.cpp b/radiantcore/selection/algorithm/Primitives.cpp index f033568961..8e5337eab9 100644 --- a/radiantcore/selection/algorithm/Primitives.cpp +++ b/radiantcore/selection/algorithm/Primitives.cpp @@ -347,7 +347,7 @@ class DecalPatchCreator } }; -void createDecalsForSelectedFaces(const cmd::ArgumentList& args) +void createDecalsForSelectedFaces() { // Sanity check if (FaceInstance::Selection().empty()) diff --git a/radiantcore/selection/algorithm/Primitives.h b/radiantcore/selection/algorithm/Primitives.h index 9002bc893e..a681fead8f 100644 --- a/radiantcore/selection/algorithm/Primitives.h +++ b/radiantcore/selection/algorithm/Primitives.h @@ -81,7 +81,7 @@ namespace selection { /** greebo: Creates a coplanar patch for each selected face instance. */ - void createDecalsForSelectedFaces(const cmd::ArgumentList& args); + void createDecalsForSelectedFaces(); /** * greebo: Applies the visportal/nodraw texture combo to the selected brushes.