Add reset button to settings flyout (#1073)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user