History

fix getEntityObject and tablet highlighting (Overlays.findOverlays)

SamGondelman committed 7 years ago

Commit 4b406bf1 parent 391cca75 files · +23 −8Browse files

Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all

Unified · Split

interface/src/Application.cpp+8−0
@@ -1955,6 +1955,14 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1954 unmodified lines
19551955 return false;
19561956 });
19571957
1958+ EntityTree::setGetEntityObjectOperator([this](const QUuid& id) -> QObject* {
1959+ auto entities = getEntities();
1960+ if (auto entity = entities->renderableForEntityId(id)) {
1961+ return qobject_cast<QObject*>(entity.get());
1962+ }
1963+ return nullptr;
1964+ });
1965+
19581966 EntityTree::setTextSizeOperator([this](const QUuid& id, const QString& text) {
19591967 auto entities = getEntities();
19601968 if (auto entity = entities->renderableForEntityId(id)) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t