This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 0377632d55 Allow empty selection in PageSelector::UpdateCurrentPage(). 
This fixes a regression in Impress, where wrong slides are selected on a 
right-click between slides when scrolling down, and new slides are inserted in 
wrong places.
0377632d55 is described below

commit 0377632d55e2f6c71bc9597b5614b3773b09d374
Author: Damjan Jovanovic <dam...@apache.org>
AuthorDate: Sun Oct 8 21:01:32 2023 +0200

    Allow empty selection in PageSelector::UpdateCurrentPage().
    This fixes a regression in Impress, where wrong slides are
    selected on a right-click between slides when scrolling down,
    and new slides are inserted in wrong places.
    
    Patch by: Andre Fischer <af@...>
    Reviewed by: me
    Fixes: #124741 - Slide will be inserted in wrong place when try to
      insert it in latter slides(with vertical scrollbar)
    
    (cherry picked from commit 2a12cc4fae255902f4870bfea0bfe724d9d4ddb8)
---
 main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx 
b/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index d4d82b1dc4..0da93988ad 100644
--- a/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -406,11 +406,6 @@ void PageSelector::UpdateCurrentPage (const bool 
bUpdateOnlyWhenPending)
             break;
         }
     }
-    if ( ! pCurrentPageDescriptor && nPageCount>0)
-    {
-        // No page is selected.  Make the first slide the current page.
-        pCurrentPageDescriptor = mrModel.GetPageDescriptor(0);
-    }
 
     if (pCurrentPageDescriptor)
     {

Reply via email to