| 293 | } |
| 294 | |
| 295 | bool |
| 296 | EditorServiceBase::configure (const std::string &name, const std::string &value) |
| 297 | { |
| 298 | bool needs_update = false; |
| 299 | |
| 300 | if (name == cfg_tracking_cursor_color) { |
| 301 | |
| 302 | tl::Color color; |
| 303 | lay::ColorConverter ().from_string (value, color); |
| 304 | |
| 305 | if (color != m_cursor_color) { |
| 306 | m_cursor_color = color; |
| 307 | needs_update = true; |
| 308 | } |
| 309 | |
| 310 | } else if (name == cfg_tracking_cursor_enabled) { |
| 311 | |
| 312 | bool f = m_cursor_enabled; |
| 313 | tl::from_string (value, f); |
| 314 | if (f != m_cursor_enabled) { |
| 315 | m_cursor_enabled = f; |
| 316 | needs_update = true; |
| 317 | } |
| 318 | |
| 319 | } |
| 320 | |
| 321 | if (needs_update) { |
| 322 | for (std::vector<lay::ViewObject *>::iterator r = m_mouse_cursor_markers.begin (); r != m_mouse_cursor_markers.end (); ++r) { |
| 323 | (*r)->redraw (); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | // NOTE: we don't take the value as other services may be interested too. |
| 328 | return false; |
| 329 | } |
| 330 | |
| 331 | void |
| 332 | EditorServiceBase::deactivated () |
nothing calls this directly
no test coverage detected