Bug 156974 - Selected style jumps back and forth after applying style
Summary: Selected style jumps back and forth after applying style
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.5.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Sidebar-Styles
  Show dependency treegraph
 
Reported: 2023-08-28 16:31 UTC by Rafael Lima
Modified: 2024-07-17 21:46 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Video showing the problem (175.49 KB, video/mp4)
2023-08-28 16:31 UTC, Rafael Lima
Details
Test file used in the video (474.14 KB, application/vnd.oasis.opendocument.presentation)
2023-08-28 16:32 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2023-08-28 16:31:43 UTC
Created attachment 189208 [details]
Video showing the problem

In Impress, if you apply a Drawing Style to an object, the selected style in the Styles deck jumps back to the previous style and then selects the desired style.

See the attached video for an example.

The expected behavior would be to simply double-click the desired style and not have it jumping back to the previous style.

System info

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 4:7.5.5-0ubuntu0.23.04.1
Calc: threaded
Comment 1 Rafael Lima 2023-08-28 16:32:49 UTC
Created attachment 189209 [details]
Test file used in the video

This is the file I used in the video. Use it to reproduce the bug.

However, the problem happens with any file.
Comment 2 Rafael Lima 2023-08-28 16:34:07 UTC
@Jim, since you've been working with the Styles deck, do you have any idea why this is happening?
Comment 3 m_a_riosv 2023-08-30 13:38:22 UTC
Reproducible.
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 33ae7c12bbdf19b76ced472ca8aed6cf66477bbe
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 4 Jim Raykowski 2023-09-03 21:55:50 UTC
(In reply to Rafael Lima from comment #2)
> @Jim, since you've been working with the Styles deck, do you have any idea
> why this is happening?
While looking for the cause of this happening I've found the cause of hair loss :-)

Probably not the correct solution to the problem but it does stop the jumping: 

IMPL_LINK_NOARG(StyleList, TimeOut, Timer*, void)
{
    if (!m_bDontUpdate)
    {
        m_bDontUpdate = true;
        if (!m_xTreeBox->get_visible())
            UpdateStyles(StyleFlags::UpdateFamilyList);
        else
        {
//            FillTreeBox(GetActualFamily());
//            SfxTemplateItem* pState = m_pFamilyState[m_nActFamily - 1].get();
//            if (pState)
//            {
//                m_pParentDialog->SelectStyle(pState->GetStyleName(), false, *this);
//                EnableDelete(nullptr);
//            }
        }
        m_bDontUpdate = false;
        pIdle.reset();
    }
    else
        pIdle->Start();
}
Comment 5 Rafael Lima 2023-09-04 13:38:29 UTC
(In reply to Jim Raykowski from comment #4)
> Probably not the correct solution to the problem but it does stop the
> jumping: 

I confirm that commenting these lines in StyleList.cxx "fixes" the problem.

Now I don't know what would the consequence of removing these lines be... this seems to be a hack for some other problem (see a few lines above a comment about the use of this Timer).