Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 197 - select and cut/copy errors/mismatches
select and cut/copy errors/mismatches
Status: CLOSED WORKSFORME
Product: Audacity
Classification: Unclassified
Component: User Interface
unspecified
Per OS All
: P4 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-05 17:08 UTC by Vaughan Johnson
Modified: 2018-08-20 11:51 UTC (History)
6 users (show)

See Also:
Steps To Reproduce:
1. Select some audio. 2. Cut The wrong number no samples were cut.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vaughan Johnson 2010-08-05 17:08:15 UTC

    
Comment 2 Martyn Shaw 2010-08-05 21:15:06 UTC
There are (at least) 4 cases in terms of the select region (mViewInfo.sel0 and mViewInfo.sel1 in the code, the <---> region in the time ruler) and what happens with copy/paste.  I have copied from one project and pasted into another in the images below.  

1) start is between 0.5 and 1 samples, end between 0 and 0.5 samples
http://dl.dropbox.com/u/1327769/fullscreen000.png

2) start is between 0.5 and 1 samples, end between 0.5 and 1 samples
http://dl.dropbox.com/u/1327769/fullscreen001.png

3) start is between 0 and 0.5 samples, end between 0 and 0.5 samples
http://dl.dropbox.com/u/1327769/fullscreen002.png

4) start is between 0 and 0.5 samples, end between 0.5 and 1 samples
http://dl.dropbox.com/u/1327769/fullscreen003.png

Note that it does not matter how many samples are between the start and the end, I've just used a few to make it more graphic.

In all of these the SelectionBar is showing the wrong first sample selected.  And probably wrong elsewhere.

Also the highlighted (greyed) region is prbably wrong. The 3 things (highlighted, copied, SelectionBar) do not not correspond.

http://bugzilla.audacityteam.org/show_bug.cgi?id=160#c2 reports 'off by one' in 2 cases out of 10 of random selection - about the same as 1 in 4 of the cases above.

http://bugzilla.audacityteam.org/show_bug.cgi?id=123#c18 may be relevant.

I'd love to see a 'moonphase/residual' or two become 'replicable' as a result of this.  Then we could make changes and tick those off.

TTFN
Mrtyn
Comment 3 Martyn Shaw 2010-08-31 20:12:24 UTC
(In reply to comment #2)
Have made 2 commits that fix the highlighted (greyed) region and the SelectionBar so that they are consistent with the ruler.
Copy/Paste operations can still be a sample out however.  I have a big list of places to check and found 3 places that msClipLen is set incorrectly (easily fixed I think).

InsertSilence uses a start and a length incorrectly I believe.

Should offsets be arbitrary or constrained to sample periods?  I think arbitrary but it does lead to some slightly strange behavior.
Comment 4 Peter Sampson 2016-07-09 08:34:13 UTC
previous testing was using the zoom buttons.

Also Ctrl(Cmd)+1 and Ctrl(Cmd)+3 for Zoom In/Out do kepp the cursor position or selection on-screen.


HOWEVER - on both platforms if I use Ctrl(Cmd)+scroll wheel to zoom the the cursor or selection still disappears off the screen

Similarly if I have a one hour tone say select anywher byond ten seconds or so and the use Ctrl(Cmd)+2 for Zoom Normal then the cursor or selection also disappears off the screen (I raised this point in a quality email thread recently).

Also using the Zoom Tool moves the cursor or selction off the screen.


Surely the current cursor position of selection is the user's current point of interest and we should be doing all we should to keep that on-screen and visible to them.

So I believe that this is not fixed and there is more work to be done here.
Comment 5 Peter Sampson 2016-07-09 08:37:10 UTC
OOPS - please IGNORE Comment #4

I was replying to Bug #1197 and inadvertently posted gere in 197 - sorry  :-(
Comment 6 James Crook 2017-08-11 10:24:43 UTC
CLOSED WORKSFORME

Martyn did work to fix this, and there were no concrete steps to reproduce.

Possibly we need to do a complete review of off-by-one-pixel type things, but that would be a new bug - or part of a clean up sweep.