Code refactoring of the OptionsGroup class:

Controls are created only for the active page now
This commit is contained in:
YuSanka 2020-09-22 11:17:43 +02:00
parent aedb3892ba
commit 398ff9053d
11 changed files with 568 additions and 386 deletions
src/slic3r/GUI

View file

@ -68,6 +68,8 @@
#include <shlobj.h>
#endif // __WXMSW__
#include <chrono>
#if ENABLE_THUMBNAIL_GENERATOR_DEBUG
#include <boost/beast/core/detail/base64.hpp>
#include <boost/nowide/fstream.hpp>
@ -78,6 +80,25 @@ namespace GUI {
class MainFrame;
class InitTimer
{
std::chrono::milliseconds start_timer;
public:
InitTimer()
{
start_timer = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::system_clock::now().time_since_epoch());
}
~InitTimer()
{
std::chrono::milliseconds stop_timer = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::system_clock::now().time_since_epoch());
auto process_duration = std::chrono::milliseconds(stop_timer - start_timer).count();
printf("on_init duration = %lld ms \n", process_duration);
}
};
class SplashScreen : public wxSplashScreen
{
public:
@ -596,6 +617,7 @@ bool GUI_App::OnInit()
bool GUI_App::on_init_inner()
{
InitTimer local_timer;
// Verify resources path
const wxString resources_dir = from_u8(Slic3r::resources_dir());
wxCHECK_MSG(wxDirExists(resources_dir), false,