Pasting text into existing label (regression)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Pasting text into existing label (regression)

Stevethefiddle
DickN reported this issue on the forum
http://forum.audacityteam.org/viewtopic.php?p=322844#p322844

I was putting it onto bugzilla, but quickly realised that it's more
complex than it first appears. Hence my post here.

Previously it was possible to paste text into a label with Ctrl+V
(Command+V), but that no longer works. I broke that - sorry  :oops:

The breakage is because the "text on clipboard" flag is one and the
same as the "audio on clipboard" flag.
The flag "0x00000040" has two names;
"ClipboardFlag" and "TextClipFlag" (but it is actually just one flag).

"TextClipFlag" isn't explicitly used anywhere, but prior to the fix
for bug 1575, it was set each time AudacityProject::GetUpdateFlags was
called.
However, although "TextClipFlag" isn't used,
"Edit > Paste"
is only active if "ClipboardFlag" is set, so if there is neither audio
or text on the clipboard, then Ctrl+V is disabled,
but not
"Edit > Paste text to new label"
which is enabled whether there is anything on the clipboard or not.

Although I admit causing the regression, it was already broken. Previously,
"Edit > Paste" was available when a label was open for pasting text if
there was audio on the clipboard, even if no text on the clipboard.

The problem is that we have one command, "Paste (Ctrl + V)" that does
two different things (paste audio and paste text), both of which work
through the same function (OnPaste) and both are enabled by the same
flag ("0x00000040"), but obviously you can't paste audio if there is
only text on the clipboard, and you can't paste text if there is only
audio.

Not sure how you want to log that.

Steve

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pasting text into existing label (regression)

Stevethefiddle
Just to add, as it's relevant to fixing this, on my Linux machine, a single call to
LabelTrack::IsTextClipSupported()
increases the time taken to update all of the flags from about 0.005 ms to around 0.5 ms, so we really don't want to be doing that more than necessary.

Steve

On 22 February 2017 at 21:44, Steve the Fiddle <[hidden email]> wrote:
DickN reported this issue on the forum
http://forum.audacityteam.org/viewtopic.php?p=322844#p322844

I was putting it onto bugzilla, but quickly realised that it's more
complex than it first appears. Hence my post here.

Previously it was possible to paste text into a label with Ctrl+V
(Command+V), but that no longer works. I broke that - sorry  :oops:

The breakage is because the "text on clipboard" flag is one and the
same as the "audio on clipboard" flag.
The flag "0x00000040" has two names;
"ClipboardFlag" and "TextClipFlag" (but it is actually just one flag).

"TextClipFlag" isn't explicitly used anywhere, but prior to the fix
for bug 1575, it was set each time AudacityProject::GetUpdateFlags was
called.
However, although "TextClipFlag" isn't used,
"Edit > Paste"
is only active if "ClipboardFlag" is set, so if there is neither audio
or text on the clipboard, then Ctrl+V is disabled,
but not
"Edit > Paste text to new label"
which is enabled whether there is anything on the clipboard or not.

Although I admit causing the regression, it was already broken. Previously,
"Edit > Paste" was available when a label was open for pasting text if
there was audio on the clipboard, even if no text on the clipboard.

The problem is that we have one command, "Paste (Ctrl + V)" that does
two different things (paste audio and paste text), both of which work
through the same function (OnPaste) and both are enabled by the same
flag ("0x00000040"), but obviously you can't paste audio if there is
only text on the clipboard, and you can't paste text if there is only
audio.

Not sure how you want to log that.

Steve


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pasting text into existing label (regression)

Gale
Administrator
In reply to this post by Stevethefiddle
Thanks, Steve.

My initial assessment

* P2 for No CTRL/COMMAND + V for paste text  (regression on 2.1.2,
   hurts repetitive workflows). I would not block 2.1.3 on it myself
   .

* P3 Paste Text to New Label active on no clipboard text


* (Perhaps) P4 Review issue about if we can improve the "Paste"
   flag doing two different things.



Gale


On 22 February 2017 at 21:44, Steve the Fiddle <[hidden email]> wrote:

> DickN reported this issue on the forum
> http://forum.audacityteam.org/viewtopic.php?p=322844#p322844
>
> I was putting it onto bugzilla, but quickly realised that it's more
> complex than it first appears. Hence my post here.
>
> Previously it was possible to paste text into a label with Ctrl+V
> (Command+V), but that no longer works. I broke that - sorry  :oops:
>
> The breakage is because the "text on clipboard" flag is one and the
> same as the "audio on clipboard" flag.
> The flag "0x00000040" has two names;
> "ClipboardFlag" and "TextClipFlag" (but it is actually just one flag).
>
> "TextClipFlag" isn't explicitly used anywhere, but prior to the fix
> for bug 1575, it was set each time AudacityProject::GetUpdateFlags was
> called.
> However, although "TextClipFlag" isn't used,
> "Edit > Paste"
> is only active if "ClipboardFlag" is set, so if there is neither audio
> or text on the clipboard, then Ctrl+V is disabled,
> but not
> "Edit > Paste text to new label"
> which is enabled whether there is anything on the clipboard or not.
>
> Although I admit causing the regression, it was already broken. Previously,
> "Edit > Paste" was available when a label was open for pasting text if
> there was audio on the clipboard, even if no text on the clipboard.
>
> The problem is that we have one command, "Paste (Ctrl + V)" that does
> two different things (paste audio and paste text), both of which work
> through the same function (OnPaste) and both are enabled by the same
> flag ("0x00000040"), but obviously you can't paste audio if there is
> only text on the clipboard, and you can't paste text if there is only
> audio.
>
> Not sure how you want to log that.
>
> Steve
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pasting text into existing label (regression)

Stevethefiddle
On 23 February 2017 at 06:17, Gale Andrews <[hidden email]> wrote:
>
> Thanks, Steve.
>
> My initial assessment
>
> * P2 for No CTRL/COMMAND + V for paste text  (regression on 2.1.2,
>    hurts repetitive workflows). I would not block 2.1.3 on it myself

This part can be "fixed" easily and safely by simply changing the
flags test for the paste command from:
AudioIONotBusyFlag | ClipboardFlag
to:
AudioIONotBusyFlag | TracksExistFlag

That restores the Ctrl+V paste into existing label behaviour.

It does not give the correct behaviour for disabling the menu item,
but that was wrong in previous releases, including 2.1.2.

>    .
>
> * P3 Paste Text to New Label active on no clipboard text

Seems a bit high to me.
Previous bugs of this type have been P4 (example: bug 62)

>
> * (Perhaps) P4 Review issue about if we can improve the "Paste"
>    flag doing two different things.

Seems a bit low to me, but I don't think a release note is appropriate
here, so I guess we would have to say P4 under the current release
note rule.

I think the way that you have divided it up into these three issues
untangles it nicely and covers the issues. Thanks.

Steve

>
> Gale
>
>
> On 22 February 2017 at 21:44, Steve the Fiddle <[hidden email]> wrote:
> > DickN reported this issue on the forum
> > http://forum.audacityteam.org/viewtopic.php?p=322844#p322844
> >
> > I was putting it onto bugzilla, but quickly realised that it's more
> > complex than it first appears. Hence my post here.
> >
> > Previously it was possible to paste text into a label with Ctrl+V
> > (Command+V), but that no longer works. I broke that - sorry  :oops:
> >
> > The breakage is because the "text on clipboard" flag is one and the
> > same as the "audio on clipboard" flag.
> > The flag "0x00000040" has two names;
> > "ClipboardFlag" and "TextClipFlag" (but it is actually just one flag).
> >
> > "TextClipFlag" isn't explicitly used anywhere, but prior to the fix
> > for bug 1575, it was set each time AudacityProject::GetUpdateFlags was
> > called.
> > However, although "TextClipFlag" isn't used,
> > "Edit > Paste"
> > is only active if "ClipboardFlag" is set, so if there is neither audio
> > or text on the clipboard, then Ctrl+V is disabled,
> > but not
> > "Edit > Paste text to new label"
> > which is enabled whether there is anything on the clipboard or not.
> >
> > Although I admit causing the regression, it was already broken. Previously,
> > "Edit > Paste" was available when a label was open for pasting text if
> > there was audio on the clipboard, even if no text on the clipboard.
> >
> > The problem is that we have one command, "Paste (Ctrl + V)" that does
> > two different things (paste audio and paste text), both of which work
> > through the same function (OnPaste) and both are enabled by the same
> > flag ("0x00000040"), but obviously you can't paste audio if there is
> > only text on the clipboard, and you can't paste text if there is only
> > audio.
> >
> > Not sure how you want to log that.
> >
> > Steve
> >
> > ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Audacity-quality mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pasting text into existing label (regression)

Peter Sampson-2
I'm puzzled here because from my testing on W10 it looks as though
there are two clipboards involved.

The audio gets copied onto the Audacity clipboard.
But the text appears to be copied onto the Windows clipboard.

Both clipboard audio and clipboard text can exist simtaneously, both can
subsequently be copied and Audacity knows fron]m the context  as to which
to paste with a Ctrl+V command.


I note Steve's workaround on the Forum of copying some audio to the Audacity
clipboard first and then labels can then Ctrl+V paste text into them - and that
works fine.

Peter.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pasting text into existing label (regression)

Gale
Administrator
In reply to this post by Stevethefiddle
Steve,

Probably your disagreement about ratings of the lesser issues is mainly
about the "policy" that P3 or above have release notes.

A P3 or above can have a "suppressed" release note but that should
I think be exceptional. Does anything bad or unintuitive happen
because the Paste flag does two different things?

I rather wanted a release note for "Paste Text to New Label active on no
clipboard text" because I think it is misleading enough to justify it.
However we may need to investigate further if there are more bugs with
this feature.

--- Intention of Paste Text to New Label ---

The Manual says:
http://alphamanual.audacityteam.org/man/Edit_Menu:_Copy,_Paste_and_Duplicate#paste_text

"Pastes the text on the system clipboard (or text from a label stored in the
Audacity clipboard) to a new label at the cursor or region position in the
currently selected label track. [...] The most recent text cut or
copied to either
clipboard is pasted."

This doesn't happen for me on Windows 10 in HEAD, 2.1.2 or 2.0.0 or on
quick test on Mac/Linux in HEAD. Is the Manual wrong?

It looks to me like once the system clipboard has been populated with text,
CTRL + ALT + V pastes that text, even if immediately prior to CTRL + ALT +
V, I selected over a label containing text and did CTRL + C.

If the system clipboard contains non-text or has been emptied e.g. with the
Microsoft clipbrd.exe, then CTRL + ALT + V opens a new empty label, even
if immediately prior to CTRL + ALT + V, I selected over a label containing
text and did CTRL + C.

The only way (on Windows) I can get CTRL + ALT + V to paste text from
a label copied to the Audacity clipboard is to reboot then launch Audacity
and don't use the system clipboard.

The above behaviour perhaps explains why its menu item is never actually
greyed. But if this near-impossibility of pasting text from a label copied to
the Audacity clipboard is unintended, it seems to justify a P3 to me.

For menu greying, assuming we want to paste text from a label on the
Audacity clipboard, I think we should grey if the system clipboard is
empty or contains non-text AND there is no label is in the Audacity
clipboard

What the Manual says should happen to decide what text is pasted
seems reasonable, but means if you copied a label but want to paste
system text, you have to recopy the system text. Is that going to work
if the system clipboard already contains the text you want to paste?

We could instead give priority to the system clipboard:

* If the system clipboard contains text, paste it even if there is a label
  in the Audacity clipboard.

* If there is no pastable text in the system clipboard but there is a label
  in the Audacity clipboard, paste the label text.

This is more intuitive I think. Completely intuitive, make CTRL + ALT + V
only use the system clipboard. I'd vote for this, which is happening now
more or less, except for the greying out not working.

I doubt we want an extra menu item to paste text from the Audacity
clipboard. If you really want to paste the text of an Audacity label, open
the label and copy it by CTRL + C or right-click > Copy, which goes on
the system clipboard.



Gale


On 23 February 2017 at 10:17, Steve the Fiddle <[hidden email]> wrote:

> On 23 February 2017 at 06:17, Gale Andrews <[hidden email]> wrote:
>>
>> Thanks, Steve.
>>
>> My initial assessment
>>
>> * P2 for No CTRL/COMMAND + V for paste text  (regression on 2.1.2,
>>    hurts repetitive workflows). I would not block 2.1.3 on it myself
>
> This part can be "fixed" easily and safely by simply changing the
> flags test for the paste command from:
> AudioIONotBusyFlag | ClipboardFlag
> to:
> AudioIONotBusyFlag | TracksExistFlag
>
> That restores the Ctrl+V paste into existing label behaviour.
>
> It does not give the correct behaviour for disabling the menu item,
> but that was wrong in previous releases, including 2.1.2.
>
>>    .
>>
>> * P3 Paste Text to New Label active on no clipboard text
>
> Seems a bit high to me.
> Previous bugs of this type have been P4 (example: bug 62)
>
>>
>> * (Perhaps) P4 Review issue about if we can improve the "Paste"
>>    flag doing two different things.
>
> Seems a bit low to me, but I don't think a release note is appropriate
> here, so I guess we would have to say P4 under the current release
> note rule.
>
> I think the way that you have divided it up into these three issues
> untangles it nicely and covers the issues. Thanks.
>
> Steve
>
>>
>> Gale
>>
>>
>> On 22 February 2017 at 21:44, Steve the Fiddle <[hidden email]> wrote:
>> > DickN reported this issue on the forum
>> > http://forum.audacityteam.org/viewtopic.php?p=322844#p322844
>> >
>> > I was putting it onto bugzilla, but quickly realised that it's more
>> > complex than it first appears. Hence my post here.
>> >
>> > Previously it was possible to paste text into a label with Ctrl+V
>> > (Command+V), but that no longer works. I broke that - sorry  :oops:
>> >
>> > The breakage is because the "text on clipboard" flag is one and the
>> > same as the "audio on clipboard" flag.
>> > The flag "0x00000040" has two names;
>> > "ClipboardFlag" and "TextClipFlag" (but it is actually just one flag).
>> >
>> > "TextClipFlag" isn't explicitly used anywhere, but prior to the fix
>> > for bug 1575, it was set each time AudacityProject::GetUpdateFlags was
>> > called.
>> > However, although "TextClipFlag" isn't used,
>> > "Edit > Paste"
>> > is only active if "ClipboardFlag" is set, so if there is neither audio
>> > or text on the clipboard, then Ctrl+V is disabled,
>> > but not
>> > "Edit > Paste text to new label"
>> > which is enabled whether there is anything on the clipboard or not.
>> >
>> > Although I admit causing the regression, it was already broken. Previously,
>> > "Edit > Paste" was available when a label was open for pasting text if
>> > there was audio on the clipboard, even if no text on the clipboard.
>> >
>> > The problem is that we have one command, "Paste (Ctrl + V)" that does
>> > two different things (paste audio and paste text), both of which work
>> > through the same function (OnPaste) and both are enabled by the same
>> > flag ("0x00000040"), but obviously you can't paste audio if there is
>> > only text on the clipboard, and you can't paste text if there is only
>> > audio.
>> >
>> > Not sure how you want to log that.
>> >
>> > Steve

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pasting text into existing label (regression)

Stevethefiddle
On 23 February 2017 at 20:20, Gale Andrews <[hidden email]> wrote:
> Steve,
>
> Probably your disagreement about ratings of the lesser issues is mainly
> about the "policy" that P3 or above have release notes.

Hi Gale, as usual, our assessment of P rating is within 1 point of
each other (it's very rare that we differ by more than 1 "P point").
The "policy" for P3 and above does tend to give the impression of a
bigger difference, but in this case I think our assessments of
priority are close.

I agree that the loss of Ctrl+V in some situations is the biggest
issue and that P2 seems about right.

Personally I think that to grey out a menu when it shouldn't be greyed
out, is worse than not greying out when not available (assuming no bad
side effects). Specifically, the Paste menu item is sometimes greyed
out when it shouldn't be, which means that the user loses
functionality - they cannot paste the clipboard contents. I think
that's worse than the Paste command being enabled when the clipboard
contains the wrong kind of data (which happened in 2.1.2).


If we fix "Review issue about if we can improve the Paste flag doing
two different things", then that should also fix "Paste Text to New
Label active on no clipboard text", so I'd give higher priority to the
former. The two issues are closely related, so hopefully both can be
fixed at the same time.

>
> A P3 or above can have a "suppressed" release note but that should
> I think be exceptional. Does anything bad or unintuitive happen
> because the Paste flag does two different things?

In RC2 the Paste menu command may be enabled when Paste is impossible.
Steps to reproduce:
1) Ensure there is no text on the system clipboard (on Debian Xfce I
can do this by copying a file).
2) Launch Audacity
3) Generate a tone
4) Copy the audio. (The clipboard now contains audio)
5) Add a label
6) Delete the audio track
The Paste command is enabled because there is "something" on the
clipboard, but paste is currently impossible because the contents of
the clipboard are of the wrong type.

In 2.1.2 the opposite happens. If a project has at least one audio
track and one label track, then Paste is enabled in audio tracks if
the clipboard contains text and no audio.


>
> I rather wanted a release note for "Paste Text to New Label active on no
> clipboard text" because I think it is misleading enough to justify it.
> However we may need to investigate further if there are more bugs with
> this feature.
>
> --- Intention of Paste Text to New Label ---
>
> The Manual says:
> http://alphamanual.audacityteam.org/man/Edit_Menu:_Copy,_Paste_and_Duplicate#paste_text
>
> "Pastes the text on the system clipboard (or text from a label stored in the
> Audacity clipboard) to a new label at the cursor or region position in the
> currently selected label track. [...] The most recent text cut or
> copied to either
> clipboard is pasted."
>
> This doesn't happen for me on Windows 10 in HEAD, 2.1.2 or 2.0.0 or on
> quick test on Mac/Linux in HEAD. Is the Manual wrong?

It works for me on Debian Xfce. Whatever text was copied most recently
is the text that is pasted.

However, an audio track must be selected for the "Alt+Ctrl+V" to work.
If only a label track is selected, then I can paste to a new label
using the menu command, but not the keyboard shortcut.

Steve

>
> It looks to me like once the system clipboard has been populated with text,
> CTRL + ALT + V pastes that text, even if immediately prior to CTRL + ALT +
> V, I selected over a label containing text and did CTRL + C.
>
> If the system clipboard contains non-text or has been emptied e.g. with the
> Microsoft clipbrd.exe, then CTRL + ALT + V opens a new empty label, even
> if immediately prior to CTRL + ALT + V, I selected over a label containing
> text and did CTRL + C.
>
> The only way (on Windows) I can get CTRL + ALT + V to paste text from
> a label copied to the Audacity clipboard is to reboot then launch Audacity
> and don't use the system clipboard.
>
> The above behaviour perhaps explains why its menu item is never actually
> greyed. But if this near-impossibility of pasting text from a label copied to
> the Audacity clipboard is unintended, it seems to justify a P3 to me.
>
> For menu greying, assuming we want to paste text from a label on the
> Audacity clipboard, I think we should grey if the system clipboard is
> empty or contains non-text AND there is no label is in the Audacity
> clipboard
>
> What the Manual says should happen to decide what text is pasted
> seems reasonable, but means if you copied a label but want to paste
> system text, you have to recopy the system text. Is that going to work
> if the system clipboard already contains the text you want to paste?
>
> We could instead give priority to the system clipboard:
>
> * If the system clipboard contains text, paste it even if there is a label
>   in the Audacity clipboard.
>
> * If there is no pastable text in the system clipboard but there is a label
>   in the Audacity clipboard, paste the label text.
>
> This is more intuitive I think. Completely intuitive, make CTRL + ALT + V
> only use the system clipboard. I'd vote for this, which is happening now
> more or less, except for the greying out not working.
>
> I doubt we want an extra menu item to paste text from the Audacity
> clipboard. If you really want to paste the text of an Audacity label, open
> the label and copy it by CTRL + C or right-click > Copy, which goes on
> the system clipboard.
>
>
>
> Gale
>
>
> On 23 February 2017 at 10:17, Steve the Fiddle <[hidden email]> wrote:
>> On 23 February 2017 at 06:17, Gale Andrews <[hidden email]> wrote:
>>>
>>> Thanks, Steve.
>>>
>>> My initial assessment
>>>
>>> * P2 for No CTRL/COMMAND + V for paste text  (regression on 2.1.2,
>>>    hurts repetitive workflows). I would not block 2.1.3 on it myself
>>
>> This part can be "fixed" easily and safely by simply changing the
>> flags test for the paste command from:
>> AudioIONotBusyFlag | ClipboardFlag
>> to:
>> AudioIONotBusyFlag | TracksExistFlag
>>
>> That restores the Ctrl+V paste into existing label behaviour.
>>
>> It does not give the correct behaviour for disabling the menu item,
>> but that was wrong in previous releases, including 2.1.2.
>>
>>>    .
>>>
>>> * P3 Paste Text to New Label active on no clipboard text
>>
>> Seems a bit high to me.
>> Previous bugs of this type have been P4 (example: bug 62)
>>
>>>
>>> * (Perhaps) P4 Review issue about if we can improve the "Paste"
>>>    flag doing two different things.
>>
>> Seems a bit low to me, but I don't think a release note is appropriate
>> here, so I guess we would have to say P4 under the current release
>> note rule.
>>
>> I think the way that you have divided it up into these three issues
>> untangles it nicely and covers the issues. Thanks.
>>
>> Steve
>>
>>>
>>> Gale
>>>
>>>
>>> On 22 February 2017 at 21:44, Steve the Fiddle <[hidden email]> wrote:
>>> > DickN reported this issue on the forum
>>> > http://forum.audacityteam.org/viewtopic.php?p=322844#p322844
>>> >
>>> > I was putting it onto bugzilla, but quickly realised that it's more
>>> > complex than it first appears. Hence my post here.
>>> >
>>> > Previously it was possible to paste text into a label with Ctrl+V
>>> > (Command+V), but that no longer works. I broke that - sorry  :oops:
>>> >
>>> > The breakage is because the "text on clipboard" flag is one and the
>>> > same as the "audio on clipboard" flag.
>>> > The flag "0x00000040" has two names;
>>> > "ClipboardFlag" and "TextClipFlag" (but it is actually just one flag).
>>> >
>>> > "TextClipFlag" isn't explicitly used anywhere, but prior to the fix
>>> > for bug 1575, it was set each time AudacityProject::GetUpdateFlags was
>>> > called.
>>> > However, although "TextClipFlag" isn't used,
>>> > "Edit > Paste"
>>> > is only active if "ClipboardFlag" is set, so if there is neither audio
>>> > or text on the clipboard, then Ctrl+V is disabled,
>>> > but not
>>> > "Edit > Paste text to new label"
>>> > which is enabled whether there is anything on the clipboard or not.
>>> >
>>> > Although I admit causing the regression, it was already broken. Previously,
>>> > "Edit > Paste" was available when a label was open for pasting text if
>>> > there was audio on the clipboard, even if no text on the clipboard.
>>> >
>>> > The problem is that we have one command, "Paste (Ctrl + V)" that does
>>> > two different things (paste audio and paste text), both of which work
>>> > through the same function (OnPaste) and both are enabled by the same
>>> > flag ("0x00000040"), but obviously you can't paste audio if there is
>>> > only text on the clipboard, and you can't paste text if there is only
>>> > audio.
>>> >
>>> > Not sure how you want to log that.
>>> >
>>> > Steve
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pasting text into existing label (regression)

Peter Sampson-2
Tests fine on the latest alphas on both W10 and Sierra 10.12.3

Peter

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Loading...