@@ -124,15 +124,15 @@ void foucaultView::showGrid() {
124124 QPushButton *btnGridCol = new QPushButton (" Grid Color" );
125125 QPushButton *btnTextCol = new QPushButton (" Text Color" );
126126
127- colors = { m_gridColor, m_textColor }; // store current values
127+ m_temp_colors = { m_gridColor, m_textColor }; // store current values
128128
129129 connect (btnGridCol, &QPushButton::clicked, this ,[this ]() {
130- QColor c = QColorDialog::getColor (colors .grid , this );
131- if (c.isValid ()) colors .grid = c;
130+ QColor c = QColorDialog::getColor (m_temp_colors .grid , this );
131+ if (c.isValid ()) m_temp_colors .grid = c;
132132 });
133133 connect (btnTextCol, &QPushButton::clicked, this , [this ]() {
134- QColor c = QColorDialog::getColor (colors .text , this );
135- if (c.isValid ()) colors .text = c;
134+ QColor c = QColorDialog::getColor (m_temp_colors .text , this );
135+ if (c.isValid ()) m_temp_colors .text = c;
136136 });
137137
138138 form.addRow (" Grid Units:" , unitCombo);
@@ -153,8 +153,8 @@ void foucaultView::showGrid() {
153153 spacingSpin->setValue (10.0 );
154154 widthSpin->setValue (1 );
155155 textToggle->setChecked (true );
156- colors .grid = Qt::cyan;
157- colors .text = Qt::white;
156+ m_temp_colors .grid = Qt::cyan;
157+ m_temp_colors .text = Qt::white;
158158 });
159159
160160 connect (&buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept);
@@ -165,8 +165,8 @@ void foucaultView::showGrid() {
165165 m_gridSpacing = spacingSpin->value ();
166166 m_gridLineWidth = widthSpin->value ();
167167 m_showUnitLabels = textToggle->isChecked ();
168- m_gridColor = colors .grid ;
169- m_textColor = colors .text ;
168+ m_gridColor = m_temp_colors .grid ;
169+ m_textColor = m_temp_colors .text ;
170170
171171 // Save to QSettings with "ronchiGrid" prefix
172172 QSettings set;
0 commit comments