feat: Add animated home button to view cube to reset camera
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -202,6 +202,7 @@ void ViewportWidget::paintGL()
|
||||
m_sketchGrid->paintAxisLabels(painter, static_cast<SketchGrid::SketchPlane>(m_currentPlane), model, projection);
|
||||
}
|
||||
m_featureBrowser->paint(painter, width(), height());
|
||||
m_viewCube->paint2D(painter, width(), height());
|
||||
|
||||
|
||||
if (m_activeSketchTool) {
|
||||
@@ -230,6 +231,12 @@ void ViewportWidget::mousePressEvent(QMouseEvent *event)
|
||||
}
|
||||
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
if (m_viewCube->handleMousePress(event->pos(), width(), height())) {
|
||||
m_camera->animateToHomeView();
|
||||
update();
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_isSelectingPlane) {
|
||||
if (m_highlightedPlane != SketchPlane::NONE) {
|
||||
emit planeSelected(m_highlightedPlane);
|
||||
|
||||
Reference in New Issue
Block a user