feat: Show XY (Top) grid by default and when sketch ends
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -31,6 +31,14 @@ ViewportWidget::ViewportWidget(QWidget *parent)
|
||||
setMouseTracking(true);
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
|
||||
// Set initial view to Top (XY plane) and show grid
|
||||
m_xRot = 90 * 16;
|
||||
m_yRot = 0;
|
||||
m_zoom = -20.0f;
|
||||
m_panX = 0.0f;
|
||||
m_panY = 0.0f;
|
||||
m_currentPlane = SketchPlane::XY;
|
||||
|
||||
m_toolIcons.insert(static_cast<int>(ApplicationController::ToolType::Line), new QSvgRenderer(QString(":/icons/line.svg"), this));
|
||||
m_toolIcons.insert(static_cast<int>(ApplicationController::ToolType::Rectangle), new QSvgRenderer(QString(":/icons/rectangle.svg"), this));
|
||||
m_toolIcons.insert(static_cast<int>(ApplicationController::ToolType::Circle), new QSvgRenderer(QString(":/icons/circle.svg"), this));
|
||||
@@ -572,7 +580,8 @@ void ViewportWidget::onSketchModeEnded()
|
||||
animGroup->addAnimation(zoomAnim);
|
||||
|
||||
connect(animGroup, &QParallelAnimationGroup::finished, this, [this]() {
|
||||
m_currentPlane = SketchPlane::NONE;
|
||||
// Return to showing the base XY grid when not in a sketch
|
||||
m_currentPlane = SketchPlane::XY;
|
||||
update();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user