mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Menu_bar and preset_tabs are in main window now
This commit is contained in:
parent
e86f149cbd
commit
8b582bbcd1
12 changed files with 489 additions and 219 deletions
|
@ -128,9 +128,10 @@ wxColour g_color_label_modified;
|
|||
wxColour g_color_label_sys;
|
||||
wxColour g_color_label_default;
|
||||
|
||||
// #ys_FIXME_for_delete
|
||||
std::vector<Tab *> g_tabs_list;
|
||||
|
||||
wxLocale* g_wxLocale;
|
||||
wxLocale* g_wxLocale {nullptr};
|
||||
|
||||
wxFont g_small_font;
|
||||
wxFont g_bold_font;
|
||||
|
@ -346,6 +347,11 @@ bool select_language(wxArrayString & names,
|
|||
return false;
|
||||
}
|
||||
|
||||
wxLocale* get_locale() {
|
||||
return g_wxLocale;
|
||||
}
|
||||
|
||||
// #ys_FIXME_for_delete
|
||||
bool load_language()
|
||||
{
|
||||
wxString language = wxEmptyString;
|
||||
|
@ -428,7 +434,8 @@ enum ConfigMenuIDs {
|
|||
ConfigMenuFlashFirmware,
|
||||
ConfigMenuCnt,
|
||||
};
|
||||
|
||||
|
||||
// #ys_FIXME_for_delete
|
||||
ConfigMenuIDs get_view_mode()
|
||||
{
|
||||
if (!g_AppConfig->has("view_mode"))
|
||||
|
@ -439,7 +446,7 @@ ConfigMenuIDs get_view_mode()
|
|||
}
|
||||
|
||||
static wxString dots("…", wxConvUTF8);
|
||||
|
||||
// #ys_FIXME_for_delete
|
||||
void add_config_menu(wxMenuBar *menu, int event_preferences_changed, int event_language_change)
|
||||
{
|
||||
auto local_menu = new wxMenu();
|
||||
|
@ -560,6 +567,7 @@ void open_model(wxWindow *parent, wxArrayString& input_files){
|
|||
|
||||
// This is called when closing the application, when loading a config file or when starting the config wizard
|
||||
// to notify the user whether he is aware that some preset changes will be lost.
|
||||
// #ys_FIXME_for_delete
|
||||
bool check_unsaved_changes()
|
||||
{
|
||||
std::string dirty;
|
||||
|
@ -636,8 +644,8 @@ std::vector<PresetTab> preset_tabs = {
|
|||
{ "filament", nullptr, ptFFF },
|
||||
{ "sla_material", nullptr, ptSLA }
|
||||
};
|
||||
const std::vector<PresetTab>& get_preset_tabs() {
|
||||
return preset_tabs;
|
||||
std::vector<PresetTab>* get_preset_tabs() {
|
||||
return &preset_tabs;
|
||||
}
|
||||
|
||||
Tab* get_tab(const std::string& name)
|
||||
|
@ -781,7 +789,7 @@ void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt
|
|||
int i = 0;//no reason, just experiment
|
||||
}
|
||||
}
|
||||
|
||||
// #ys_FIXME_for_delete
|
||||
void add_created_tab(Tab* panel, int event_value_change, int event_presets_changed)
|
||||
{
|
||||
panel->create_preset_tab(g_PresetBundle);
|
||||
|
@ -1212,7 +1220,7 @@ bool is_expert_mode(){
|
|||
|
||||
ConfigOptionsGroup* get_optgroup(size_t i)
|
||||
{
|
||||
return m_optgroups[i].get();
|
||||
return m_optgroups.empty() ? nullptr : m_optgroups[i].get();
|
||||
}
|
||||
|
||||
std::vector <std::shared_ptr<ConfigOptionsGroup>>& get_optgroups() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue