comparison view/ViewManager.cpp @ 711:084fd76deb89 tonioni

Allow per-pane overrides for tool mode
author Chris Cannam
date Thu, 09 Jan 2014 16:41:55 +0000
parents ad12e428785b
children f831ca41d4a5
comparison
equal deleted inserted replaced
710:c65826b5e980 711:084fd76deb89
362 case MeasureMode: emit activity(tr("Enter Measure mode")); break; 362 case MeasureMode: emit activity(tr("Enter Measure mode")); break;
363 case NoteEditMode: emit activity(tr("Enter NoteEdit mode")); break; // GF: NoteEditMode activity (I'm not yet certain why we need to emit this.) 363 case NoteEditMode: emit activity(tr("Enter NoteEdit mode")); break; // GF: NoteEditMode activity (I'm not yet certain why we need to emit this.)
364 }; 364 };
365 } 365 }
366 366
367 ViewManager::ToolMode
368 ViewManager::getToolModeFor(const View *v) const
369 {
370 if (m_toolModeOverrides.find(v) == m_toolModeOverrides.end()) {
371 return getToolMode();
372 } else {
373 return m_toolModeOverrides.find(v)->second;
374 }
375 }
376
377 void
378 ViewManager::setToolModeFor(const View *v, ToolMode mode)
379 {
380 m_toolModeOverrides[v] = mode;
381 }
382
383 void
384 ViewManager::clearToolModeOverrides()
385 {
386 m_toolModeOverrides.clear();
387 }
388
367 void 389 void
368 ViewManager::setPlayLoopMode(bool mode) 390 ViewManager::setPlayLoopMode(bool mode)
369 { 391 {
370 if (m_playLoopMode != mode) { 392 if (m_playLoopMode != mode) {
371 393