Skip to content

Commit

Permalink
[Editor] Try to keep marker after paste (euma)
Browse files Browse the repository at this point in the history
  • Loading branch information
mean committed Sep 26, 2016
1 parent 13bbbd9 commit 66d6fd6
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions avidemux/common/gui_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,32 @@ void HandleAction (Action action)
case ACT_Paste:
{
uint64_t currentPts=video_body->getCurrentFramePts();
uint64_t d=video_body->getVideoDuration();
uint64_t markA,markB;
markA=video_body->getMarkerAPts();
markB=video_body->getMarkerBPts();
if(markA>markB)
{
uint64_t p=markA;
markA=markB;
markB=p;
}
video_body->pasteFromClipBoard(currentPts);
video_body->getVideoInfo (avifileinfo);
A_ResetMarkers();
ReSync ();
d=video_body->getVideoDuration()-d;
if(markA>=currentPts)
{
markA+=d;
markB+=d;
}
if(markA<currentPts && currentPts<markB)
{
markB+=d;
}
video_body->setMarkerAPts(markA);
video_body->setMarkerBPts(markB);
A_Resync();
GUI_GoToTime(currentPts);
}
break;
break;
Expand Down

0 comments on commit 66d6fd6

Please sign in to comment.