| 339 | } |
| 340 | |
| 341 | void |
| 342 | Editables::transient_to_selection () |
| 343 | { |
| 344 | bool had_transient_selection = false; |
| 345 | bool had_selection = false; |
| 346 | for (iterator e = begin (); e != end (); ++e) { |
| 347 | if (e->has_selection ()) { |
| 348 | had_selection = true; |
| 349 | } |
| 350 | if (e->has_transient_selection ()) { |
| 351 | had_transient_selection = true; |
| 352 | } |
| 353 | e->select (db::DBox (), lay::Editable::Reset); // clear selection |
| 354 | e->clear_previous_selection (); |
| 355 | e->transient_to_selection (); |
| 356 | e->clear_transient_selection (); |
| 357 | } |
| 358 | |
| 359 | // send a signal to the observers |
| 360 | if (had_transient_selection) { |
| 361 | signal_transient_selection_changed (); |
| 362 | } |
| 363 | if (had_selection || had_transient_selection) { |
| 364 | signal_selection_changed (); |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | void |
| 369 | Editables::clear_selection () |
no test coverage detected