Taseditor: auto-starting Note editing when creating Marker by double-click
[[Split portion of a mixed commit.]]
This commit is contained in:
parent
4659c2b2cb
commit
1b5c7797c4
|
@ -1127,9 +1127,17 @@ void PIANO_ROLL::FinishDrag()
|
|||
marker_drag_countdown = MARKER_DRAG_COUNTDOWN_MAX;
|
||||
} else
|
||||
{
|
||||
if (row_under_mouse >= 0 && row_under_mouse != marker_drag_framenum && (column_under_mouse <= COLUMN_FRAMENUM || column_under_mouse >= COLUMN_FRAMENUM2))
|
||||
if (row_under_mouse >= 0 && (column_under_mouse <= COLUMN_FRAMENUM || column_under_mouse >= COLUMN_FRAMENUM2))
|
||||
{
|
||||
if (markers_manager.GetMarker(row_under_mouse))
|
||||
if (row_under_mouse == marker_drag_framenum)
|
||||
{
|
||||
// it was just double-click and release
|
||||
// set focus to lower Note edit field
|
||||
int dragged_marker_id = markers_manager.GetMarker(marker_drag_framenum);
|
||||
int selection_marker_id = markers_manager.GetMarkerUp(selection.GetCurrentSelectionBeginning());
|
||||
if (dragged_marker_id == selection_marker_id)
|
||||
SetFocus(selection.hwndSelectionMarkerEdit);
|
||||
} else if (markers_manager.GetMarker(row_under_mouse))
|
||||
{
|
||||
int dragged_marker_id = markers_manager.GetMarker(marker_drag_framenum);
|
||||
int destination_marker_id = markers_manager.GetMarker(row_under_mouse);
|
||||
|
|
|
@ -537,9 +537,6 @@ LRESULT APIENTRY UpperMarkerEditWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
|
|||
SendMessage(playback.hwndPlaybackMarkerEdit, EM_SETREADONLY, false, 0);
|
||||
// disable FCEUX keyboard
|
||||
ClearTaseditorInput();
|
||||
// scroll to the Marker
|
||||
if (taseditor_config.follow_note_context)
|
||||
piano_roll.FollowMarker(playback.shown_marker);
|
||||
break;
|
||||
}
|
||||
case WM_KILLFOCUS:
|
||||
|
@ -574,9 +571,14 @@ LRESULT APIENTRY UpperMarkerEditWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
|
|||
SetFocus(piano_roll.hwndList);
|
||||
return 0;
|
||||
case VK_TAB:
|
||||
{
|
||||
// switch to lower edit control (also exit and save text changes)
|
||||
SetFocus(selection.hwndSelectionMarkerEdit);
|
||||
// scroll to the Marker
|
||||
if (taseditor_config.follow_note_context)
|
||||
piano_roll.FollowMarker(selection.shown_marker);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -587,6 +589,14 @@ LRESULT APIENTRY UpperMarkerEditWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
|
|||
playback.MiddleButtonClick();
|
||||
return 0;
|
||||
}
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_RBUTTONDOWN:
|
||||
{
|
||||
// scroll to the Marker
|
||||
if (taseditor_config.follow_note_context)
|
||||
piano_roll.FollowMarker(playback.shown_marker);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CallWindowProc(playbackMarkerEdit_oldWndproc, hWnd, msg, wParam, lParam);
|
||||
}
|
||||
|
|
|
@ -687,9 +687,6 @@ LRESULT APIENTRY LowerMarkerEditWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
|
|||
SendMessage(selection.hwndSelectionMarkerEdit, EM_SETREADONLY, false, 0);
|
||||
// disable FCEUX keyboard
|
||||
ClearTaseditorInput();
|
||||
// scroll to the Marker
|
||||
if (taseditor_config.follow_note_context)
|
||||
piano_roll.FollowMarker(selection.shown_marker);
|
||||
break;
|
||||
}
|
||||
case WM_KILLFOCUS:
|
||||
|
@ -723,9 +720,14 @@ LRESULT APIENTRY LowerMarkerEditWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
|
|||
SetFocus(piano_roll.hwndList);
|
||||
return 0;
|
||||
case VK_TAB:
|
||||
{
|
||||
// switch to upper edit control (also exit and save text changes)
|
||||
SetFocus(playback.hwndPlaybackMarkerEdit);
|
||||
// scroll to the Marker
|
||||
if (taseditor_config.follow_note_context)
|
||||
piano_roll.FollowMarker(playback.shown_marker);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -736,6 +738,14 @@ LRESULT APIENTRY LowerMarkerEditWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
|
|||
playback.MiddleButtonClick();
|
||||
return 0;
|
||||
}
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_RBUTTONDOWN:
|
||||
{
|
||||
// scroll to the Marker
|
||||
if (taseditor_config.follow_note_context)
|
||||
piano_roll.FollowMarker(selection.shown_marker);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CallWindowProc(selectionMarkerEdit_oldWndproc, hWnd, msg, wParam, lParam);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue