Sketcher: Use generic tool hints table for DrawSketchHandlerBSpline

This commit is contained in:
Kacper Donat
2025-06-28 20:02:46 +02:00
parent 91de480bc8
commit ed14e6b24f

View File

@@ -414,34 +414,37 @@ private:
return Gui::lookupHints<State>(
{constructionMethod(), state()},
{// ControlPoints method
{.state = {ConstructionMethod::ControlPoints, SelectMode::SeekFirst},
.hints =
{
{QObject::tr("%1 pick first control point"), {MouseLeft}},
switchHint,
}},
{.state = {ConstructionMethod::ControlPoints, SelectMode::SeekSecond},
.hints =
{
{QObject::tr("%1 pick next control point"), {MouseLeft}},
{QObject::tr("%1 finish B-spline"), {MouseRight}},
switchHint,
}},
{
// ControlPoints method
{.state = {ConstructionMethod::ControlPoints, SelectMode::SeekFirst},
.hints =
{
{QObject::tr("%1 pick first control point"), {MouseLeft}},
switchHint,
}},
{.state = {ConstructionMethod::ControlPoints, SelectMode::SeekSecond},
.hints =
{
{QObject::tr("%1 pick next control point"), {MouseLeft}},
{QObject::tr("%1 finish B-spline"), {MouseRight}},
switchHint,
}},
// Knots method
{.state = {ConstructionMethod::Knots, SelectMode::SeekFirst},
.hints =
{
{QObject::tr("%1 pick first knot"), {MouseLeft}},
switchHint,
}},
{.state = {ConstructionMethod::Knots, SelectMode::SeekSecond},
.hints = {
{QObject::tr("%1 pick next knot"), {MouseLeft}},
{QObject::tr("%1 finish B-spline"), {MouseRight}},
switchHint,
}}});
// Knots method
{.state = {ConstructionMethod::Knots, SelectMode::SeekFirst},
.hints =
{
{QObject::tr("%1 pick first knot"), {MouseLeft}},
switchHint,
}},
{.state = {ConstructionMethod::Knots, SelectMode::SeekSecond},
.hints =
{
{QObject::tr("%1 pick next knot"), {MouseLeft}},
{QObject::tr("%1 finish B-spline"), {MouseRight}},
switchHint,
}},
});
}
std::string getToolName() const override