Allow pasting of another timecode format.
authorCarl Hetherington <cth@carlh.net>
Fri, 17 Jan 2025 19:56:49 +0000 (20:56 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 17 Jan 2025 19:56:49 +0000 (20:56 +0100)
src/wx/timecode.cc

index 6538bf986eaee455bbdda71a6d34fab6d846a85e..e81b10db1099b0244d5a5ea53be2d3f4ab0f44b3 100644 (file)
@@ -152,6 +152,12 @@ TimecodeBase::paste(wxClipboardTextEvent& ev)
                        _seconds->SetValue(contents.Mid(4, 2));
                        _frames->SetValue(contents.Mid(6, 2));
                        return;
+               } else if (contents.Length() == 11 && contents[2] == ':' && contents[5] == ':' && contents[8] == ':') {
+                       _hours->SetValue(contents.Mid(0, 2));
+                       _minutes->SetValue(contents.Mid(3, 2));
+                       _seconds->SetValue(contents.Mid(6, 2));
+                       _frames->SetValue(contents.Mid(9, 2));
+                       return;
                }
        }