Update preview when changing shading mode. Fixes #113.

This commit is contained in:
Leonardo Zide 2017-08-26 08:37:52 -07:00
parent d263ce812c
commit 81c70f9daa
2 changed files with 10 additions and 7 deletions

View file

@ -985,6 +985,15 @@ void lcMainWindow::ShowPrintDialog()
#endif #endif
} }
void lcMainWindow::SetShadingMode(lcShadingMode ShadingMode)
{
lcGetPreferences().mShadingMode = ShadingMode;
UpdateShadingMode();
UpdateAllViews();
if (mPartSelectionWidget)
mPartSelectionWidget->Redraw();
}
// todo: call dialogs directly // todo: call dialogs directly
#include "lc_qhtmldialog.h" #include "lc_qhtmldialog.h"
#include "lc_qpropertiesdialog.h" #include "lc_qpropertiesdialog.h"

View file

@ -318,6 +318,7 @@ protected:
void ShowUpdatesDialog(); void ShowUpdatesDialog();
void ShowAboutDialog(); void ShowAboutDialog();
void ShowPrintDialog(); void ShowPrintDialog();
void SetShadingMode(lcShadingMode ShadingMode);
lcModelTabWidget* GetTabWidgetForModel(lcModel* Model) const lcModelTabWidget* GetTabWidgetForModel(lcModel* Model) const
{ {
@ -332,13 +333,6 @@ protected:
return nullptr; return nullptr;
} }
void SetShadingMode(lcShadingMode ShadingMode)
{
lcGetPreferences().mShadingMode = ShadingMode;
UpdateShadingMode();
UpdateAllViews();
}
bool mAddKeys; bool mAddKeys;
lcTool mTool; lcTool mTool;
lcTransformType mTransformType; lcTransformType mTransformType;