comparison view/Pane.cpp @ 597:2f087d950621

Fix status bar tip on Mac (SF bug 3024342)
author Chris Cannam
date Wed, 28 Sep 2011 13:38:39 +0100
parents 4806715f7a19
children 2bf6dc6bc4d1 5b72899d692b
comparison
equal deleted inserted replaced
596:6948c3cc151e 597:2f087d950621
1233 1233
1234 kr.setCategory(tr("Select Tool Mouse Actions")); 1234 kr.setCategory(tr("Select Tool Mouse Actions"));
1235 kr.registerShortcut(tr("Select"), tr("Left"), 1235 kr.registerShortcut(tr("Select"), tr("Left"),
1236 tr("Click left button and drag to select region; drag region edge to resize")); 1236 tr("Click left button and drag to select region; drag region edge to resize"));
1237 kr.registerShortcut(tr("Multi Select"), tr("Ctrl+Left"), 1237 kr.registerShortcut(tr("Multi Select"), tr("Ctrl+Left"),
1238 #ifdef Q_OS_MAC
1239 tr("Cmd-click left button and drag to select an additional region"));
1240 #else
1238 tr("Ctrl-click left button and drag to select an additional region")); 1241 tr("Ctrl-click left button and drag to select an additional region"));
1242 #endif
1239 kr.registerShortcut(tr("Fine Select"), tr("Shift+Left"), 1243 kr.registerShortcut(tr("Fine Select"), tr("Shift+Left"),
1240 tr("Shift-click left button and drag to select without snapping to items or grid")); 1244 tr("Shift-click left button and drag to select without snapping to items or grid"));
1241 1245
1242 kr.setCategory(tr("Edit Tool Mouse Actions")); 1246 kr.setCategory(tr("Edit Tool Mouse Actions"));
1243 kr.registerShortcut(tr("Move"), tr("Left"), 1247 kr.registerShortcut(tr("Move"), tr("Left"),
2513 if (!hasTopLayerTimeXAxis()) return; 2517 if (!hasTopLayerTimeXAxis()) return;
2514 2518
2515 bool haveSelection = (m_manager && !m_manager->getSelections().empty()); 2519 bool haveSelection = (m_manager && !m_manager->getSelections().empty());
2516 2520
2517 if (haveSelection) { 2521 if (haveSelection) {
2522 #ifdef Q_OS_MAC
2523 if (editable) {
2524 help = tr("Click and drag to select a range; hold Shift to avoid snapping to items; hold Cmd for multi-select; middle-click and drag to navigate");
2525 } else {
2526 help = tr("Click and drag to select a range; hold Cmd for multi-select; middle-click and drag to navigate");
2527 }
2528 #else
2518 if (editable) { 2529 if (editable) {
2519 help = tr("Click and drag to select a range; hold Shift to avoid snapping to items; hold Ctrl for multi-select; middle-click and drag to navigate"); 2530 help = tr("Click and drag to select a range; hold Shift to avoid snapping to items; hold Ctrl for multi-select; middle-click and drag to navigate");
2520 } else { 2531 } else {
2521 help = tr("Click and drag to select a range; hold Ctrl for multi-select; middle-click and drag to navigate"); 2532 help = tr("Click and drag to select a range; hold Ctrl for multi-select; middle-click and drag to navigate");
2522 } 2533 }
2534 #endif
2523 2535
2524 if (pos) { 2536 if (pos) {
2525 bool closeToLeft = false, closeToRight = false; 2537 bool closeToLeft = false, closeToRight = false;
2526 Selection selection = getSelectionAt(pos->x(), closeToLeft, closeToRight); 2538 Selection selection = getSelectionAt(pos->x(), closeToLeft, closeToRight);
2527 if ((closeToLeft || closeToRight) && !(closeToLeft && closeToRight)) { 2539 if ((closeToLeft || closeToRight) && !(closeToLeft && closeToRight)) {