Skip to content

Commit

Permalink
qmlui: fix fixture head selection
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Nov 11, 2024
1 parent 9e273b5 commit e8ecb67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions qmlui/contextmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,9 @@ void ContextManager::setFixtureSelection(quint32 itemID, int headIndex, bool ena
int linkedIndex = FixtureUtils::itemLinkedIndex(itemID);
int headIdx = FixtureUtils::itemHeadIndex(itemID);

if (enable)
qDebug() << "Selected itemID" << itemID << ", fixture ID" << fixtureID << ", head" << headIdx;

if (m_selectedFixtures.contains(itemID))
{
if (enable == false)
Expand Down
4 changes: 1 addition & 3 deletions qmlui/fixturemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,7 @@ void FixtureManager::addFixtureNode(Doc *doc, TreeModel *treeModel, Fixture *fix
{
for (int headIdx = 0; headIdx < fixture->heads(); headIdx++)
{
quint32 iID = itemID;
if (fixture->type() == QLCFixtureDef::Dimmer)
iID = FixtureUtils::fixtureItemID(fixture->id(), headIdx, linkedIndex);
quint32 iID = FixtureUtils::fixtureItemID(fixture->id(), headIdx, linkedIndex);

QVariantList headParams;
headParams.append(QVariant::fromValue(fixture)); // classRef
Expand Down
1 change: 0 additions & 1 deletion qmlui/qml/fixturesfunctions/FixtureGroupManager.qml
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ Rectangle
contextManager.setFixtureSelection(iID, -1, true)
break;
case App.HeadDragItem:
console.log("Head clicked. ItemID: " + qItem.itemID + ", head: " + iID)
itemID = qItem.itemID
contextManager.setFixtureSelection(qItem.itemID, iID, true);
break;
Expand Down

0 comments on commit e8ecb67

Please sign in to comment.