| 1377 | // ---------------------------------------------------------------------------------------- |
| 1378 | |
| 1379 | void widget_group:: |
| 1380 | remove ( |
| 1381 | const drawable& widget |
| 1382 | ) |
| 1383 | { |
| 1384 | auto_mutex M(m); |
| 1385 | drawable* w = const_cast<drawable*>(&widget); |
| 1386 | if (widgets.is_in_domain(w)) |
| 1387 | { |
| 1388 | widgets.destroy(w); |
| 1389 | |
| 1390 | // check if we also have an entry in the wg_widgets set and if |
| 1391 | // so then remove that too |
| 1392 | widget_group* wg = reinterpret_cast<widget_group*>(w); |
| 1393 | if (wg_widgets.is_member(wg)) |
| 1394 | { |
| 1395 | wg_widgets.destroy(wg); |
| 1396 | } |
| 1397 | } |
| 1398 | } |
| 1399 | |
| 1400 | // ---------------------------------------------------------------------------------------- |
| 1401 | |