graphic fix

This commit is contained in:
2023-10-29 20:03:46 +03:00
parent 0cf8136757
commit 4aa4c56a35
3 changed files with 38 additions and 18 deletions

View File

@@ -22,7 +22,6 @@ GraphicType::GraphicType(QString name_, QColor color, Qt::PenStyle style, double
name = name_;
visible = visible_;
pointWidth = 2.;
pb = new QCheckBox(name);
}
@@ -34,6 +33,20 @@ void GraphicType::removeData() {
}
bool GraphicType::init() {
if (pb) return false;
pb = new QCheckBox(name);
return true;
}
void GraphicType::destroy() {
if (!pb) return;
delete pb;
pb = nullptr;
}
// GraphicConf
GraphicConf::GraphicConf(QVector<GraphicType> & graphics_, QWidget * parent): QDialog(parent), graphics(graphics_) {