Fix option Hide labels.

Enabling it and the app restart hides all points.
This commit is contained in:
Roman Telezhynskyi 2022-10-14 17:29:59 +03:00
parent 7beb234f22
commit 867400332f
3 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,7 @@
- Fix loading background image.
- [smart-pattern/valentina#187] Puzzle: message "Invalid version: Max supported version 0.1.2" when opening 0.1.1 file in Val 0.7.52.
- Fix export measurement separator to CSV.
- Fix option Hide labels.
# Valentina 0.7.52 September 12, 2022
- Fix crash when default locale is ru.

View File

@ -2973,6 +2973,7 @@ void MainWindow::ToolBarTools()
});
ui->actionHideLabels->setShortcut(QKeySequence(Qt::AltModifier + Qt::Key_L));
ui->actionHideLabels->setChecked(VAbstractValApplication::VApp()->ValentinaSettings()->GetHideLabels());
connect(ui->actionHideLabels, &QAction::triggered, this, [this](bool checked)
{
VAbstractValApplication::VApp()->ValentinaSettings()->SetHideLabels(checked);

View File

@ -66,6 +66,9 @@ void VScenePoint::paint(QPainter *painter, const QStyleOptionGraphicsItem *optio
{
const qreal scale = SceneScale(scene());
ScaleMainPenWidth(scale);
ScaleCircleSize(this, scale);
if (VAbstractApplication::VApp()->Settings()->GetLabelFontSize()*scale < minVisibleFontSize ||
VAbstractApplication::VApp()->Settings()->GetHideLabels())
{
@ -74,9 +77,6 @@ void VScenePoint::paint(QPainter *painter, const QStyleOptionGraphicsItem *optio
}
else
{
ScaleMainPenWidth(scale);
ScaleCircleSize(this, scale);
if (not m_onlyPoint)
{
m_namePoint->setVisible(m_showLabel);