mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-16 02:02:51 -07:00
Add reset button to settings flyout (#1073)
This commit is contained in:
parent
e8d03eafc1
commit
4f8db42855
6 changed files with 44 additions and 5 deletions
|
@ -71,6 +71,26 @@ void GraphingSettingsViewModel::InitRanges()
|
|||
m_dontUpdateDisplayRange = false;
|
||||
}
|
||||
|
||||
void GraphingSettingsViewModel::ResetView()
|
||||
{
|
||||
if (m_Graph != nullptr)
|
||||
{
|
||||
m_Graph->ResetGrid();
|
||||
InitRanges();
|
||||
m_XMinError = false;
|
||||
m_XMaxError = false;
|
||||
m_YMinError = false;
|
||||
m_YMaxError = false;
|
||||
|
||||
RaisePropertyChanged("XError");
|
||||
RaisePropertyChanged("XMin");
|
||||
RaisePropertyChanged("XMax");
|
||||
RaisePropertyChanged("YError");
|
||||
RaisePropertyChanged("YMin");
|
||||
RaisePropertyChanged("YMax");
|
||||
}
|
||||
}
|
||||
|
||||
void GraphingSettingsViewModel::UpdateDisplayRange()
|
||||
{
|
||||
if (m_Graph == nullptr || m_dontUpdateDisplayRange || HasError())
|
||||
|
|
|
@ -275,6 +275,7 @@ namespace CalculatorApp::ViewModel
|
|||
public:
|
||||
void SetGrapher(GraphControl::Grapher ^ grapher);
|
||||
void InitRanges();
|
||||
void ResetView();
|
||||
bool HasError();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue