From: <hug...@li...> - 2011-11-12 08:09:39
|
branch: details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgrepo/h/hu/hugin/hugin/rev/fa9b98f3e67a changeset: 5659:fa9b98f3e67a user: tmodes date: Sat Nov 12 08:49:35 2011 +0100 description: Use command key instead of control key on MacOS Fixes 887404 diffstat: src/hugin1/hugin/CPEditorPanel.cpp | 4 ++-- src/hugin1/hugin/CPImageCtrl.cpp | 14 +++++++------- src/hugin1/hugin/GLPreviewFrame.cpp | 4 ++-- src/hugin1/hugin/ImagesList.cpp | 2 +- src/hugin1/hugin/MaskEditorPanel.cpp | 4 ++-- src/hugin1/hugin/MaskImageCtrl.cpp | 6 +++--- src/hugin1/hugin/OverviewCameraTool.cpp | 4 ++-- src/hugin1/hugin/PreviewFrame.cpp | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diffs (160 lines): diff -r edfde934d80b -r fa9b98f3e67a src/hugin1/hugin/CPEditorPanel.cpp --- a/src/hugin1/hugin/CPEditorPanel.cpp Thu Nov 10 18:36:04 2011 +0100 +++ b/src/hugin1/hugin/CPEditorPanel.cpp Sat Nov 12 08:49:35 2011 +0100 @@ -1558,11 +1558,11 @@ } #endif - } else if (e.ControlDown() && e.GetKeyCode() == WXK_LEFT) { + } else if (e.CmdDown() && e.GetKeyCode() == WXK_LEFT) { // move to previous wxCommandEvent dummy; OnPrevImg(dummy); - } else if (e.ControlDown() && e.GetKeyCode() == WXK_RIGHT) { + } else if (e.CmdDown() && e.GetKeyCode() == WXK_RIGHT) { // move to next wxCommandEvent dummy; OnNextImg(dummy); diff -r edfde934d80b -r fa9b98f3e67a src/hugin1/hugin/CPImageCtrl.cpp --- a/src/hugin1/hugin/CPImageCtrl.cpp Thu Nov 10 18:36:04 2011 +0100 +++ b/src/hugin1/hugin/CPImageCtrl.cpp Sat Nov 12 08:49:35 2011 +0100 @@ -1173,7 +1173,7 @@ { return; } - if(mouse.ControlDown() && (editState==NO_SELECTION || editState==KNOWN_POINT_SELECTED || editState==NEW_POINT_SELECTED)) + if(mouse.CmdDown() && (editState==NO_SELECTION || editState==KNOWN_POINT_SELECTED || editState==NEW_POINT_SELECTED)) { rectStartPos=mpos; editState=SELECT_DELETE_REGION; @@ -1313,11 +1313,11 @@ DEBUG_TRACE(" OnKey, key:" << e.m_keyCode); wxPoint delta(0,0); // check for cursor keys, if control is not pressed - if ((!e.ControlDown()) && e.GetKeyCode() == WXK_LEFT ) delta.x = -1; - if ((!e.ControlDown()) && e.GetKeyCode() == WXK_RIGHT ) delta.x = 1; - if ((!e.ControlDown()) && e.GetKeyCode() == WXK_UP ) delta.y = -1; - if ((!e.ControlDown()) && e.GetKeyCode() == WXK_DOWN ) delta.y = 1; - if ( (delta.x != 0 || delta.y != 0 ) && (e.ShiftDown() || e.ControlDown())) { + if ((!e.CmdDown()) && e.GetKeyCode() == WXK_LEFT ) delta.x = -1; + if ((!e.CmdDown()) && e.GetKeyCode() == WXK_RIGHT ) delta.x = 1; + if ((!e.CmdDown()) && e.GetKeyCode() == WXK_UP ) delta.y = -1; + if ((!e.CmdDown()) && e.GetKeyCode() == WXK_DOWN ) delta.y = 1; + if ( (delta.x != 0 || delta.y != 0 ) && (e.ShiftDown() || e.CmdDown())) { // move to the left double speed = (double) GetClientSize().GetWidth()/10; delta.x = (int) (delta.x * speed); @@ -1327,7 +1327,7 @@ // as well. CPEvent e(this, CPEvent::SCROLLED, FDiff2D(delta.x, delta.y)); emit(e); - } else if (e.ControlDown()) { + } else if (e.CmdDown()) { ScrollDelta(delta); } } else if (delta.x != 0 || delta.y != 0 ) { diff -r edfde934d80b -r fa9b98f3e67a src/hugin1/hugin/GLPreviewFrame.cpp --- a/src/hugin1/hugin/GLPreviewFrame.cpp Thu Nov 10 18:36:04 2011 +0100 +++ b/src/hugin1/hugin/GLPreviewFrame.cpp Sat Nov 12 08:49:35 2011 +0100 @@ -693,8 +693,8 @@ m_showProjectionHints = cfg->Read(wxT("/GLPreviewFrame/ShowProjectionHints"), HUGIN_SHOW_PROJECTION_HINTS) == 1; wxAcceleratorEntry entries[3]; entries[0].Set(wxACCEL_NORMAL,WXK_F11,ID_FULL_SCREEN); - entries[1].Set(wxACCEL_CTRL,(int)'Z',ID_UNDO); - entries[2].Set(wxACCEL_CTRL,(int)'R',ID_REDO); + entries[1].Set(wxACCEL_CMD,(int)'Z',ID_UNDO); + entries[2].Set(wxACCEL_CMD,(int)'R',ID_REDO); wxAcceleratorTable accel(3, entries); SetAcceleratorTable(accel); #ifdef __WXGTK__ diff -r edfde934d80b -r fa9b98f3e67a src/hugin1/hugin/ImagesList.cpp --- a/src/hugin1/hugin/ImagesList.cpp Thu Nov 10 18:36:04 2011 +0100 +++ b/src/hugin1/hugin/ImagesList.cpp Sat Nov 12 08:49:35 2011 +0100 @@ -349,7 +349,7 @@ }; case 1: //Ctrl+A { - if(!m_singleSelect && e.ControlDown()) + if(!m_singleSelect && e.CmdDown()) { SelectAll(); } diff -r edfde934d80b -r fa9b98f3e67a src/hugin1/hugin/MaskEditorPanel.cpp --- a/src/hugin1/hugin/MaskEditorPanel.cpp Thu Nov 10 18:36:04 2011 +0100 +++ b/src/hugin1/hugin/MaskEditorPanel.cpp Sat Nov 12 08:49:35 2011 +0100 @@ -151,8 +151,8 @@ //set shortcuts wxAcceleratorEntry entries[2]; - entries[0].Set(wxACCEL_CTRL,(int)'C',XRCID("mask_editor_copy")); - entries[1].Set(wxACCEL_CTRL,(int)'V',XRCID("mask_editor_paste")); + entries[0].Set(wxACCEL_CMD,(int)'C',XRCID("mask_editor_copy")); + entries[1].Set(wxACCEL_CMD,(int)'V',XRCID("mask_editor_paste")); wxAcceleratorTable accel(2, entries); SetAcceleratorTable(accel); diff -r edfde934d80b -r fa9b98f3e67a src/hugin1/hugin/MaskImageCtrl.cpp --- a/src/hugin1/hugin/MaskImageCtrl.cpp Thu Nov 10 18:36:04 2011 +0100 +++ b/src/hugin1/hugin/MaskImageCtrl.cpp Sat Nov 12 08:49:35 2011 +0100 @@ -225,7 +225,7 @@ DrawSelectionRectangle(); break; case NO_SELECTION: - if(mouse.ControlDown()) + if(mouse.CmdDown()) { // check if mouse clicks happens near one line of active polygon unsigned int index=m_editingMask.FindPointNearPos(currentPos,5*maxSelectionDistance); @@ -254,7 +254,7 @@ }; break; case POINTS_SELECTED: - if(mouse.ControlDown()) + if(mouse.CmdDown()) { // check if mouse clicks happens near one line of active polygon unsigned int index=m_editingMask.FindPointNearPos(currentPos, 5*maxSelectionDistance); @@ -467,7 +467,7 @@ { case NO_SELECTION: case POINTS_SELECTED: - if(mouse.ControlDown()) + if(mouse.CmdDown()) { maskEditState=POINTS_DELETING; DrawSelectionRectangle(); diff -r edfde934d80b -r fa9b98f3e67a src/hugin1/hugin/OverviewCameraTool.cpp --- a/src/hugin1/hugin/OverviewCameraTool.cpp Thu Nov 10 18:36:04 2011 +0100 +++ b/src/hugin1/hugin/OverviewCameraTool.cpp Sat Nov 12 08:49:35 2011 +0100 @@ -59,7 +59,7 @@ void PanosphereOverviewCameraTool::MouseButtonEvent(wxMouseEvent &e) { // DEBUG_DEBUG("mouse ov drag button"); - if ((e.ButtonDown() && (!helper->IsMouseOverPano() || e.ControlDown() || e.AltDown())) || e.MiddleDown()) { + if ((e.ButtonDown() && (!helper->IsMouseOverPano() || e.CmdDown() || e.AltDown())) || e.MiddleDown()) { down = true; hugin_utils::FDiff2D pos = helper->GetMouseScreenPosition(); start_x = pos.x; @@ -175,7 +175,7 @@ PlaneOverviewToolHelper * thelper = (PlaneOverviewToolHelper*) helper; PlaneOverviewVisualizationState* state = (PlaneOverviewVisualizationState*) helper->GetVisualizationStatePtr(); // DEBUG_DEBUG("mouse ov drag button"); - if (((e.ControlDown() || e.AltDown()) && e.LeftDown()) || e.MiddleDown()) { + if (((e.CmdDown() || e.AltDown()) && e.LeftDown()) || e.MiddleDown()) { down = true; start_x = thelper->getPlaneX(); start_y = thelper->getPlaneY(); diff -r edfde934d80b -r fa9b98f3e67a src/hugin1/hugin/PreviewFrame.cpp --- a/src/hugin1/hugin/PreviewFrame.cpp Thu Nov 10 18:36:04 2011 +0100 +++ b/src/hugin1/hugin/PreviewFrame.cpp Sat Nov 12 08:49:35 2011 +0100 @@ -375,8 +375,8 @@ SetStatusText(_("Center panorama with left mouse button, set horizon with right button"),0); wxAcceleratorEntry entries[3]; entries[0].Set(wxACCEL_NORMAL,WXK_F11,ID_FULL_SCREEN); - entries[1].Set(wxACCEL_CTRL,(int)'Z',ID_UNDO); - entries[2].Set(wxACCEL_CTRL,(int)'R',ID_REDO); + entries[1].Set(wxACCEL_CMD,(int)'Z',ID_UNDO); + entries[2].Set(wxACCEL_CMD,(int)'R',ID_REDO); wxAcceleratorTable accel(3, entries); SetAcceleratorTable(accel); #ifdef __WXGTK__ |