Bug 92612 - Right-clicking after applying "paint buckets" leads to multiple Undo
Summary: Right-clicking after applying "paint buckets" leads to multiple Undo
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Ashod Nakashian
URL:
Whiteboard: target:5.1.0 target:4.4.6 target:5.0.2
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-08 02:14 UTC by Ashod Nakashian
Modified: 2016-10-25 19:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ashod Nakashian 2015-07-08 02:14:08 UTC
On the master (5.1 alpha,) highly reproducible unexpected behavior:

1. Start a new text document.
2. Type some text.
3. Click on Font Color, cursor changes into pain bucket => Unexpected. Is intentional?
4. Click and drag over some text to apply font color.
5. Right-click on the page and the font-color is undone. Further right-clicks undo the typed text! => Certainly unexpected!

Without applying the font color, right-clicking doesn't undo the text. This leads me to think this is an unintentional bug of undoing the "apply font-color" operation.
Comment 1 tommy27 2015-07-08 16:02:11 UTC
(In reply to Ashod Nakashian from comment #0)
> On the master (5.1 alpha,) highly reproducible unexpected behavior:

please tell your O/S.

> 
> 1. Start a new text document.
> 2. Type some text.
> 3. Click on Font Color, cursor changes into pain bucket => Unexpected. Is
> intentional?

I think it's always been like that. the cursor changes into "bucket" in order to paint the text you select later.

> 4. Click and drag over some text to apply font color.
> 5. Right-click on the page and the font-color is undone. Further
> right-clicks undo the typed text! => Certainly unexpected!
> 
> Without applying the font color, right-clicking doesn't undo the text. This
> leads me to think this is an unintentional bug of undoing the "apply
> font-color" operation.

all other steps are reproducible under Win7x64 using LibO 4.4.3.2 and  5.1.0.0.alpha1+ (x64)
Build ID: 449d272daf5e99f039cdfdd25f020bd798fb9e1d
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-07-08_08:13:06
Locale: it-IT (it_IT)

I didn't know about this right click undo thing so I have to retest with older releases to tell if it's always been like that.

In the meantime I set status to NEW and I ask to the UX-team if this behaviour is intended or not and which is it's rationale
Comment 2 tommy27 2015-07-08 18:33:07 UTC
retested with LibO 3.3.3 and OOo 3.3.0
it's always been like that so inherited from OOo and most likely an intended behaviour.

same thing with all the other "color buckets" toolbar buttons like highlighting.

I'd like to hear the opinion of the UX-team to know if we should label this a NOTABUG
Comment 3 Ashod Nakashian 2015-07-09 03:24:19 UTC
Thanks for checking this.

The main issue I see with this is that it isn't consistent. The paint-bucket mode will not undo unless painting is done at least once. However once it can undo, it will undo any and all changes preceding the paint. It seems that the point is to allow for more user-friendly experience when one in paint mode to undo minor errors and continue with painting uninterrupted.

More reasonably, right-clicking after painting (in paint bucket mode,) should undo _only_ the pain operation(s) and never beyond. Undoing other changes than paint is inconsistent and should be avoided (and probably was unintentional).
Comment 4 tommy27 2015-07-09 04:24:34 UTC
yes, I understand what you mean.

we can argue if the first undo that reverts the color change is a feature or a bug but the second undo that erases text is probably a bug or at least lack of consistency

I think that those "Undo" should not go beyond reverting the paint thing...
Comment 5 Ashod Nakashian 2015-07-11 17:18:03 UTC
I've submitted a patch to fix this issue. The behavior is as follows:

The patch tracks the changes done after entering the paint bucket mode, and allows the user to undo them using right-clicking until they reach the first operation before entering this context. Because the user can undo/redo using other means, the patch takes it into account and will reset its tracking to accommodate this. Ultimately, the user is able to make any changes in paint bucket
mode and undo them all by right-clicking, but no further than that.

Will update when it's merged.
Comment 6 Commit Notification 2015-08-21 22:02:30 UTC
Ashod Nakashian committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d0489d0827fc6cef04d0f3602023d82ceda82480

tdf#92612 Right-clicking after applying "paint buckets" leads to multiple Undo

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Yousuf Philips (jay) (retired) 2015-09-01 22:33:02 UTC
Hi Ashod,

It would be good to cherry-pick this fix for 4.4 and 5.0.
Comment 8 Ashod Nakashian 2015-09-02 03:05:56 UTC
 and submit (In reply to Yousuf (Jay) Philips from comment #7)
> Hi Ashod,
> 
> It would be good to cherry-pick this fix for 4.4 and 5.0.

Done. Both are submitted on gerrit.
Comment 9 Commit Notification 2015-09-02 22:27:20 UTC
Ashod Nakashian committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=815e403237ab178c8d9d51f02ea10e9f473784d8&h=libreoffice-4-4

tdf#92612 Right-clicking after applying "paint buckets" leads to multiple Undo

It will be available in 4.4.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2015-09-02 22:27:24 UTC
Ashod Nakashian committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=498dae651451554513fa0fb1487b2d92bbf88347&h=libreoffice-5-0

tdf#92612 Right-clicking after applying "paint buckets" leads to multiple Undo

It will be available in 5.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.