Fix crash.

This commit is contained in:
Roman Telezhynskyi 2021-07-01 16:54:49 +03:00
parent 391a721d84
commit 7ea984f194
2 changed files with 13 additions and 7 deletions

View File

@ -1,3 +1,6 @@
# Valentina 0.7.49 (unreleased)
- Fix crash.
# Valentina 0.7.48 June 29, 2021 # Valentina 0.7.48 June 29, 2021
- [smart-pattern/valentina#129] Incorrect behavior of empty arc and elliptical arc. - [smart-pattern/valentina#129] Incorrect behavior of empty arc and elliptical arc.
- Parsing formulas with not canonical math symbols. - Parsing formulas with not canonical math symbols.

View File

@ -125,6 +125,8 @@ void VGraphicsSimpleTextItem::paint(QPainter *painter, const QStyleOptionGraphic
void VGraphicsSimpleTextItem::setEnabled(bool enabled) void VGraphicsSimpleTextItem::setEnabled(bool enabled)
{ {
QGraphicsSimpleTextItem::setEnabled(enabled); QGraphicsSimpleTextItem::setEnabled(enabled);
if (this->scene())
{
const QPalette palet = this->scene()->palette(); const QPalette palet = this->scene()->palette();
if (enabled) if (enabled)
{ {
@ -135,6 +137,7 @@ void VGraphicsSimpleTextItem::setEnabled(bool enabled)
setBrush(palet.brush(QPalette::Disabled, QPalette::Text)); setBrush(palet.brush(QPalette::Disabled, QPalette::Text));
} }
} }
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VGraphicsSimpleTextItem::LabelSelectionType(const SelectionType &type) void VGraphicsSimpleTextItem::LabelSelectionType(const SelectionType &type)