Skip to content

Commit

Permalink
CommandPalette: add center pivot & create link
Browse files Browse the repository at this point in the history
Ref: #214
  • Loading branch information
rodlie committed Jul 28, 2024
1 parent 772075c commit 33c1869
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/app/GUI/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,28 @@ void MainWindow::setupExtraMenus()
});
cmdAddAction(act);
}
// center pivot
{
const auto act = menu->addAction(QIcon::fromTheme("dialog-information"/* TODO: find new (blender) icon! */),
tr("Center Pivot"));
connect(act, &QAction::triggered, this, [this]() {
const auto scene = *mDocument.fActiveScene;
if (!scene) { return; }
scene->centerPivotForSelected();
});
cmdAddAction(act);
}
// create link
{
const auto act = menu->addAction(QIcon::fromTheme("dialog-information"/* TODO: find new (blender) icon! */),
tr("Create Link"));
connect(act, &QAction::triggered, this, [this]() {
const auto scene = *mDocument.fActiveScene;
if (!scene) { return; }
scene->createLinkBoxForSelected();
});
cmdAddAction(act);
}
}

void MainWindow::setResolutionText(QString text)
Expand Down

0 comments on commit 33c1869

Please sign in to comment.