Skip to content

Commit

Permalink
#5634: Copy the picked material name to the system clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Jun 10, 2021
1 parent 5e2f3a2 commit 37b5eef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions radiantcore/selection/shaderclipboard/ShaderClipboard.cpp
Expand Up @@ -4,6 +4,7 @@
#include "imap.h"
#include "iselectiontest.h"
#include "iscenegraph.h"
#include "iclipboard.h"
#include "ClosestTexturableFinder.h"

#include "util/ScopedBoolLock.h"
Expand Down Expand Up @@ -93,6 +94,12 @@ void ShaderClipboard::pickFromSelectionTest(SelectionTest& test)

_source = getTexturable(test);

// Copy the material name to the system clipboard when picking
if (!_source.empty() && module::GlobalModuleRegistry().moduleExists(MODULE_CLIPBOARD))
{
GlobalClipboard().setString(_source.getShader());
}

sourceChanged();
}

Expand Down

0 comments on commit 37b5eef

Please sign in to comment.