renaissance1: #i107215# Do not show buttons for Draw documents.

This commit is contained in:
Andre Fischer
2010-06-17 14:55:31 +02:00
parent e51ec1618d
commit d57de36d81
3 changed files with 39 additions and 21 deletions

View File

@@ -857,11 +857,19 @@ void SelectionFunction::SwitchToMultiSelectionMode (
void SelectionFunction::SwitchToButtonMode (void)
bool SelectionFunction::SwitchToButtonMode (void)
{
if (mpModeHandler->GetMode() != ButtonMode)
SwitchMode(::boost::shared_ptr<ModeHandler>(
new ButtonModeHandler(mrSlideSorter, *this)));
// Do not show the buttons for draw pages.
::boost::shared_ptr<ViewShell> pMainViewShell (mrSlideSorter.GetViewShellBase()->GetMainViewShell());
if (pMainViewShell
&& pMainViewShell->GetShellType()!=ViewShell::ST_DRAW
&& mpModeHandler->GetMode() != ButtonMode)
{
SwitchMode(::boost::shared_ptr<ModeHandler>(new ButtonModeHandler(mrSlideSorter, *this)));
return true;
}
else
return false;
}
@@ -1357,8 +1365,8 @@ bool NormalModeHandler::ProcessButtonDownEvent (
// (or being faded in.)
if (mrSlideSorter.GetView().GetButtonBar().IsVisible(rDescriptor.mpHitDescriptor))
{
mrSelectionFunction.SwitchToButtonMode();
ReprocessEvent(rDescriptor);
if (mrSelectionFunction.SwitchToButtonMode())
ReprocessEvent(rDescriptor);
}
else
{