Changeset View
Changeset View
Standalone View
Standalone View
libs/pageapp/KoPADocument.cpp
Show First 20 Lines • Show All 712 Lines • ▼ Show 20 Line(s) | 711 | if ( index != -1 ) { | |||
---|---|---|---|---|---|
713 | 713 | | |||
714 | // change to previous page when the page is the active one if the first one is delete go to the next one | 714 | // change to previous page when the page is the active one if the first one is delete go to the next one | ||
715 | int newIndex = index == 0 ? 0 : index - 1; | 715 | int newIndex = index == 0 ? 0 : index - 1; | ||
716 | KoPAPageBase * newActivePage = pages.at( newIndex ); | 716 | KoPAPageBase * newActivePage = pages.at( newIndex ); | ||
717 | 717 | | |||
718 | updatePageCount(); | 718 | updatePageCount(); | ||
719 | 719 | | |||
720 | emit replaceActivePage(page, newActivePage); | 720 | emit replaceActivePage(page, newActivePage); | ||
721 | emit pageRemoved(page); | 721 | emit pageRemoved(page, index); | ||
722 | } | 722 | } | ||
723 | 723 | | |||
724 | if ( pages.size() == 1 ) { | 724 | if ( pages.size() == 1 ) { | ||
725 | emit actionsPossible(KoPAView::ActionDeletePage, false); | 725 | emit actionsPossible(KoPAView::ActionDeletePage, false); | ||
726 | } | 726 | } | ||
727 | 727 | | |||
728 | 728 | | |||
729 | return index; | 729 | return index; | ||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |