159 // Show a color edit dialog for the types that actually use the color |
159 // Show a color edit dialog for the types that actually use the color |
160 if (defaults->isColored()) |
160 if (defaults->isColored()) |
161 { if (obj != null) |
161 { if (obj != null) |
162 colnum = obj->getColor(); |
162 colnum = obj->getColor(); |
163 else |
163 else |
164 colnum = (type == LDObject::CndLine || type == LDObject::Line) ? edgecolor : maincolor; |
164 colnum = (type == LDObject::CondLine || type == LDObject::Line) ? edgecolor : maincolor; |
165 |
165 |
166 pb_color = new QPushButton; |
166 pb_color = new QPushButton; |
167 setButtonBackground (pb_color, colnum); |
167 setButtonBackground (pb_color, colnum); |
168 connect (pb_color, SIGNAL (clicked()), this, SLOT (slot_colorButtonClicked())); |
168 connect (pb_color, SIGNAL (clicked()), this, SLOT (slot_colorButtonClicked())); |
169 } |
169 } |
178 QGridLayout* const layout = new QGridLayout; |
178 QGridLayout* const layout = new QGridLayout; |
179 layout->addWidget (lb_typeIcon, 0, 0); |
179 layout->addWidget (lb_typeIcon, 0, 0); |
180 |
180 |
181 switch (type) |
181 switch (type) |
182 { case LDObject::Line: |
182 { case LDObject::Line: |
183 case LDObject::CndLine: |
183 case LDObject::CondLine: |
184 case LDObject::Triangle: |
184 case LDObject::Triangle: |
185 case LDObject::Quad: |
185 case LDObject::Quad: |
186 |
186 |
187 // Apply coordinates |
187 // Apply coordinates |
188 if (obj) |
188 if (obj) |