SlideSorter: insert new slide on double-click.
Previously inserting a new slide required using a context menu (via right-click) or the main menu-bar. It is now possible to insert a blank slide by double-clicking in an empty area of the slide sorter. Change-Id: Id7ac5f9d3befd02d0a89ad5e1631885c0493ad3d Reviewed-on: https://gerrit.libreoffice.org/6442 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
committed by
Caolán McNamara
parent
ffbad09336
commit
61a20e43b1
@@ -1275,6 +1275,27 @@ bool NormalModeHandler::ProcessButtonDownEvent (
|
|||||||
DeselectAllPages();
|
DeselectAllPages();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case BUTTON_DOWN | LEFT_BUTTON | DOUBLE_CLICK | NOT_OVER_PAGE:
|
||||||
|
{
|
||||||
|
// Insert a new slide:
|
||||||
|
// First of all we need to set the insertion indicator which sets the
|
||||||
|
// position where the new slide will be inserted.
|
||||||
|
::boost::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler
|
||||||
|
= mrSlideSorter.GetController().GetInsertionIndicatorHandler();
|
||||||
|
|
||||||
|
pInsertionIndicatorHandler->Start(false);
|
||||||
|
pInsertionIndicatorHandler->UpdatePosition(
|
||||||
|
rDescriptor.maMousePosition,
|
||||||
|
InsertionIndicatorHandler::MoveMode);
|
||||||
|
mrSlideSorter.GetController().GetSelectionManager()->SetInsertionPosition(
|
||||||
|
pInsertionIndicatorHandler->GetInsertionPageIndex());
|
||||||
|
|
||||||
|
mrSlideSorter.GetViewShell()->GetDispatcher()->Execute(
|
||||||
|
SID_INSERTPAGE,
|
||||||
|
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user