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,21 +554,21 @@ void Calculator::SetDefaultFocus()
void Calculator::ToggleHistoryFlyout(Object ^ /*parameter*/) void Calculator::ToggleHistoryFlyout(Object ^ /*parameter*/)
{ {
String ^ viewState = App::GetAppViewState(); if (Model->IsProgrammer || App::GetAppViewState() == ViewState::DockedView)
// 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 (m_fIsHistoryFlyoutOpen) return;
{
HistoryFlyout->Hide();
}
else
{
HistoryFlyout->Content = m_historyList;
m_historyList->RowHeight = NumpadPanel->ActualHeight;
FlyoutBase::ShowAttachedFlyout(HistoryButton);
}
} }
if (m_fIsHistoryFlyoutOpen)
{
HistoryFlyout->Hide();
}
else
{
HistoryFlyout->Content = m_historyList;
m_historyList->RowHeight = NumpadPanel->ActualHeight;
FlyoutBase::ShowAttachedFlyout(HistoryButton);
}
} }
void Calculator::ToggleMemoryFlyout() void Calculator::ToggleMemoryFlyout()