Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not mark edited file as dirty when selecting note #908

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/screens/UScreenEditSub.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,6 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre
SDLK_RIGHT:
begin
// right
CopyToUndo;
if SDL_ModState = 0 then
begin
// clear debug text
Expand All @@ -1905,6 +1904,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre
// ctrl + right
if SDL_ModState = KMOD_LCTRL then
begin
CopyToUndo;
if Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Duration > 1 then
begin
Dec(Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Duration);
Expand All @@ -1921,6 +1921,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre
// shift + right
if SDL_ModState = KMOD_LSHIFT then
begin
CopyToUndo;
Inc(Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].StartBeat);
if CurrentNote[CurrentTrack] = 0 then
begin
Expand All @@ -1935,6 +1936,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre
// alt + right
if SDL_ModState = KMOD_LALT then
begin
CopyToUndo;
Inc(Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Duration);
if CurrentNote[CurrentTrack] = Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].HighNote then
begin
Expand All @@ -1947,6 +1949,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre
// alt + ctrl + shift + right = move all from cursor to right
if SDL_ModState = KMOD_LALT + KMOD_LCTRL + KMOD_LSHIFT then
begin
CopyToUndo;
MoveAllToEnd(1);
Text[TextInfo].Text := Language.Translate('EDIT_INFO_NOTES_SHIFTED_RIGHT');
GoldenRec.KillAll;
Expand All @@ -1957,7 +1960,6 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre
SDLK_LEFT:
begin
// left
CopyToUndo;
if SDL_ModState = 0 then
begin
// clear debug text
Expand All @@ -1983,6 +1985,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre
// ctrl + left
if SDL_ModState = KMOD_LCTRL then
begin
CopyToUndo;
Dec(Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].StartBeat);
Inc(Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Duration);
if CurrentNote[CurrentTrack] = 0 then
Expand All @@ -1994,6 +1997,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre
// shift + left
if SDL_ModState = KMOD_LSHIFT then
begin
CopyToUndo;
Dec(Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].StartBeat);

// resizing sentences
Expand All @@ -2011,6 +2015,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre
// alt + left
if SDL_ModState = KMOD_LALT then
begin
CopyToUndo;
if Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Duration > 1 then
begin
Dec(Tracks[CurrentTrack].Lines[Tracks[CurrentTrack].CurrentLine].Notes[CurrentNote[CurrentTrack]].Duration);
Expand All @@ -2026,6 +2031,7 @@ function TScreenEditSub.ParseInput(PressedKey: cardinal; CharCode: UCS4Char; Pre
// alt + ctrl + shift + right = move all from cursor to left
if SDL_ModState = KMOD_LALT + KMOD_LCTRL + KMOD_LSHIFT then
begin
CopyToUndo;
MoveAllToEnd(-1);
Text[TextInfo].Text := Language.Translate('EDIT_INFO_NOTES_SHIFTED_LEFT');
GoldenRec.KillAll;
Expand Down