Save show curve details state between sessions.
--HG-- branch : develop
This commit is contained in:
parent
1cd126856c
commit
8309fa8c7a
|
@ -4208,10 +4208,12 @@ void MainWindow::CreateActions()
|
|||
}
|
||||
});
|
||||
|
||||
ui->actionShowCurveDetails->setChecked(qApp->ValentinaSettings()->IsShowCurveDetails());
|
||||
connect(ui->actionShowCurveDetails, &QAction::triggered, this, [this](bool checked)
|
||||
{
|
||||
ui->view->itemClicked(nullptr);
|
||||
sceneDraw->EnableDetailsMode(checked);
|
||||
qApp->ValentinaSettings()->SetShowCurveDetails(checked);
|
||||
});
|
||||
|
||||
connect(ui->actionLoadIndividual, &QAction::triggered, this, &MainWindow::LoadIndividual);
|
||||
|
|
|
@ -70,6 +70,7 @@ const QString settingDoublePassmark = QStringLiteral("pattern/do
|
|||
const QString settingPatternDefaultSeamAllowance = QStringLiteral("pattern/defaultSeamAllowance");
|
||||
const QString settingPatternLabelFont = QStringLiteral("pattern/labelFont");
|
||||
const QString settingPatternCurveApproximationScale = QStringLiteral("pattern/curveApproximationScale");
|
||||
const QString settingPatternShowCurveDetails = QStringLiteral("pattern/showCurveDetails");
|
||||
|
||||
const QString settingGeneralRecentFileList = QStringLiteral("recentFileList");
|
||||
const QString settingGeneralRestoreFileList = QStringLiteral("restoreFileList");
|
||||
|
@ -986,3 +987,15 @@ void VCommonSettings::SetCurveApproximationScale(qreal value)
|
|||
setValue(settingPatternCurveApproximationScale, value);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
bool VCommonSettings::IsShowCurveDetails() const
|
||||
{
|
||||
return value(settingPatternShowCurveDetails, false).toBool();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VCommonSettings::SetShowCurveDetails(bool value)
|
||||
{
|
||||
setValue(settingPatternShowCurveDetails, value);
|
||||
}
|
||||
|
|
|
@ -189,6 +189,8 @@ public:
|
|||
qreal GetCurveApproximationScale() const;
|
||||
void SetCurveApproximationScale(qreal value);
|
||||
|
||||
bool IsShowCurveDetails() const;
|
||||
void SetShowCurveDetails(bool value);
|
||||
private:
|
||||
Q_DISABLE_COPY(VCommonSettings)
|
||||
};
|
||||
|
|
|
@ -61,7 +61,7 @@ VAbstractSpline::VAbstractSpline(VAbstractPattern *doc, VContainer *data, quint3
|
|||
controlPoints(),
|
||||
sceneType(SceneObject::Unknown),
|
||||
m_isHovered(false),
|
||||
detailsMode(false),
|
||||
detailsMode(qApp->Settings()->IsShowCurveDetails()),
|
||||
m_parentRefresh(false)
|
||||
{
|
||||
InitDefShape();
|
||||
|
|
|
@ -118,7 +118,7 @@ VToolSpline::VToolSpline(VToolSplineInitData initData, QGraphicsItem *parent)
|
|||
freeAngle2, freeLength2, this);
|
||||
InitControlPoint(controlPoint2);
|
||||
|
||||
ShowHandles(false);
|
||||
ShowHandles(detailsMode);
|
||||
|
||||
ToolCreation(initData.typeCreation);
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ VToolSplinePath::VToolSplinePath(const VToolSplinePathInitData &initData, QGraph
|
|||
InitControlPoint(controlPoint);
|
||||
}
|
||||
|
||||
ShowHandles(false);
|
||||
ShowHandles(detailsMode);
|
||||
|
||||
ToolCreation(initData.typeCreation);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,10 @@
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VToolCut::VToolCut(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula,
|
||||
const quint32 &curveCutId, QGraphicsItem *parent)
|
||||
:VToolSinglePoint(doc, data, id, parent), formula(formula), curveCutId(curveCutId), detailsMode(false)
|
||||
: VToolSinglePoint(doc, data, id, parent),
|
||||
formula(formula),
|
||||
curveCutId(curveCutId),
|
||||
detailsMode(qApp->Settings()->IsShowCurveDetails())
|
||||
{
|
||||
Q_ASSERT_X(curveCutId != 0, Q_FUNC_INFO, "curveCutId == 0"); //-V654 //-V712
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user