Prevent the history panel to be displayed when using the Programmer mode (#676)

Be sure we don't display the panel when the current view is the Programmer mode.

Fixes #665
This commit is contained in:
Rudy Huyn 2019-09-20 16:29:45 -07:00 committed by Howard Wolosky
parent c4fe87a118
commit 80912a33d0

View File

@ -554,10 +554,11 @@ void Calculator::SetDefaultFocus()
void Calculator::ToggleHistoryFlyout(Object ^ /*parameter*/)
{
String ^ viewState = App::GetAppViewState();
// If app starts correctly in snap mode and shortcut is used for history then we need to load history if not yet initialized.
if (viewState != ViewState::DockedView)
if (Model->IsProgrammer || App::GetAppViewState() == ViewState::DockedView)
{
return;
}
if (m_fIsHistoryFlyoutOpen)
{
HistoryFlyout->Hide();
@ -568,7 +569,6 @@ void Calculator::ToggleHistoryFlyout(Object ^ /*parameter*/)
m_historyList->RowHeight = NumpadPanel->ActualHeight;
FlyoutBase::ShowAttachedFlyout(HistoryButton);
}
}
}
void Calculator::ToggleMemoryFlyout()