From 503846fd7f02273b5669a039de3f9809f82cd68e Mon Sep 17 00:00:00 2001 From: Unreal Karaulov Date: Mon, 18 Dec 2023 19:17:52 +0300 Subject: [PATCH] Add copy textures in menu --- src/editor/Gui.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/editor/Gui.cpp b/src/editor/Gui.cpp index cd19d6be..c5174732 100644 --- a/src/editor/Gui.cpp +++ b/src/editor/Gui.cpp @@ -2497,9 +2497,12 @@ void Gui::drawMenuBar() { app->cutEnt(); } - if (ImGui::MenuItem(get_localized_string(LANG_1083).c_str(), get_localized_string(LANG_1084).c_str(), false, nonWorldspawnEntSelected && app->pickInfo.selectedEnts.size())) + if (ImGui::MenuItem(get_localized_string(LANG_1083).c_str(), get_localized_string(LANG_1084).c_str(), false, app->pickInfo.selectedFaces.size() || (nonWorldspawnEntSelected && app->pickInfo.selectedEnts.size()))) { - app->copyEnt(); + if (app->pickInfo.selectedEnts.size()) + app->copyEnt(); + if (app->pickInfo.selectedFaces.size()) + copyTexture(); } if (ImGui::MenuItem(get_localized_string(LANG_1157).c_str(), get_localized_string(LANG_1158).c_str(), false, mapSelected && app->copiedEnts.size())) {