diff --git a/3d-viewer/dialogs/panel_3D_colors.cpp b/3d-viewer/dialogs/panel_3D_colors.cpp
index 00847fcbe2..54bf291c62 100644
--- a/3d-viewer/dialogs/panel_3D_colors.cpp
+++ b/3d-viewer/dialogs/panel_3D_colors.cpp
@@ -107,3 +107,21 @@ bool PANEL_3D_COLORS::TransferDataFromWindow()
return true;
}
+
+
+void PANEL_3D_COLORS::ResetPanel()
+{
+ COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
+
+ m_backgroundTop->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_BACKGROUND_TOP ), false );
+ m_backgroundBottom->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_BACKGROUND_BOTTOM ), false );
+ m_silkscreenTop->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_SILKSCREEN_TOP ), false );
+ m_silkscreenBottom->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_SILKSCREEN_BOTTOM ), false );
+ m_solderMaskTop->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_SOLDERMASK_TOP ), false );
+ m_solderMaskBottom->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_SOLDERMASK_BOTTOM ), false );
+ m_solderPaste->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_SOLDERPASTE ), false );
+ m_surfaceFinish->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_COPPER ), false );
+ m_boardBody->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_BOARD ), false );
+
+ m_boardStackupRB->SetValue( true );
+}
\ No newline at end of file
diff --git a/3d-viewer/dialogs/panel_3D_colors.h b/3d-viewer/dialogs/panel_3D_colors.h
index a26348ca39..782dc601d1 100644
--- a/3d-viewer/dialogs/panel_3D_colors.h
+++ b/3d-viewer/dialogs/panel_3D_colors.h
@@ -32,11 +32,10 @@ class PANEL_3D_COLORS : public PANEL_3D_COLORS_BASE
public:
explicit PANEL_3D_COLORS( wxWindow* aParent );
- /// Automatically called when clicking on the OK button
bool TransferDataFromWindow() override;
-
- /// Automatically called after creating the dialog
bool TransferDataToWindow() override;
+
+ void ResetPanel() override;
};
diff --git a/3d-viewer/dialogs/panel_3D_colors_base.cpp b/3d-viewer/dialogs/panel_3D_colors_base.cpp
index 108b850c9f..7a7a1fc6e5 100644
--- a/3d-viewer/dialogs/panel_3D_colors_base.cpp
+++ b/3d-viewer/dialogs/panel_3D_colors_base.cpp
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version 3.9.0 Aug 10 2021)
+// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -11,7 +11,7 @@
///////////////////////////////////////////////////////////////////////////
-PANEL_3D_COLORS_BASE::PANEL_3D_COLORS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
+PANEL_3D_COLORS_BASE::PANEL_3D_COLORS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
{
wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL );
diff --git a/3d-viewer/dialogs/panel_3D_colors_base.fbp b/3d-viewer/dialogs/panel_3D_colors_base.fbp
index 0ceefbf5e4..6ef159bd87 100644
--- a/3d-viewer/dialogs/panel_3D_colors_base.fbp
+++ b/3d-viewer/dialogs/panel_3D_colors_base.fbp
@@ -14,7 +14,6 @@
panel_3D_colors_base
1000
none
-
1
panel_3D_colors_base
@@ -26,7 +25,6 @@
1
1
UI
- 0
0
0