Replaced Object list before Object(Part) Settings
This commit is contained in:
parent
54298c8e61
commit
38768a7bda
@ -519,7 +519,7 @@ sub new {
|
||||
my $box = Wx::StaticBox->new($self->{right_panel}, -1, L("Sliced Info"));
|
||||
$box->SetFont($Slic3r::GUI::small_bold_font);
|
||||
$print_info_sizer = Wx::StaticBoxSizer->new($box, wxVERTICAL);
|
||||
$print_info_sizer->SetMinSize([300,-1]);
|
||||
$print_info_sizer->SetMinSize([316,-1]);
|
||||
my $grid_sizer = Wx::FlexGridSizer->new(2, 2, 5, 5);
|
||||
$grid_sizer->SetFlexibleDirection(wxHORIZONTAL);
|
||||
$grid_sizer->AddGrowableCol(1, 1);
|
||||
@ -555,7 +555,7 @@ sub new {
|
||||
|
||||
### Sizer for info boxes
|
||||
my $info_sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
$info_sizer->SetMinSize([310, -1]);
|
||||
$info_sizer->SetMinSize([318, -1]);
|
||||
$info_sizer->Add($object_info_sizer, 0, wxEXPAND | wxBOTTOM, 5);
|
||||
$info_sizer->Add($print_info_sizer, 0, wxEXPAND | wxBOTTOM, 5);
|
||||
|
||||
|
@ -133,6 +133,7 @@ wxWindow *g_right_panel = nullptr;
|
||||
wxBoxSizer *g_frequently_changed_parameters_sizer = nullptr;
|
||||
wxBoxSizer *g_expert_mode_part_sizer = nullptr;
|
||||
wxBoxSizer *g_scrolled_window_sizer = nullptr;
|
||||
wxBoxSizer *g_object_list_sizer = nullptr;
|
||||
wxButton *g_btn_export_gcode = nullptr;
|
||||
wxButton *g_btn_export_stl = nullptr;
|
||||
wxButton *g_btn_reslice = nullptr;
|
||||
@ -244,6 +245,10 @@ void set_show_manifold_warning_icon(bool show)
|
||||
g_show_manifold_warning_icon = show;
|
||||
}
|
||||
|
||||
void set_objects_list_sizer(wxBoxSizer *objects_list_sizer){
|
||||
g_object_list_sizer = objects_list_sizer;
|
||||
}
|
||||
|
||||
std::vector<Tab *>& get_tabs_list()
|
||||
{
|
||||
return g_tabs_list;
|
||||
@ -815,7 +820,7 @@ wxNotebook * get_tab_panel() {
|
||||
return g_wxTabPanel;
|
||||
}
|
||||
|
||||
const int& label_width(){
|
||||
const size_t& label_width(){
|
||||
return m_label_width;
|
||||
}
|
||||
|
||||
@ -899,7 +904,7 @@ void add_expert_mode_part( wxWindow* parent, wxBoxSizer* sizer,
|
||||
|
||||
wxWindowUpdateLocker noUpdates(parent);
|
||||
|
||||
add_objects_list(parent, sizer);
|
||||
// add_objects_list(parent, sizer);
|
||||
|
||||
// add_collapsible_panes(parent, sizer);
|
||||
}
|
||||
@ -952,6 +957,8 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl
|
||||
const wxArrayInt& ar = preset_sizer->GetColWidths();
|
||||
m_label_width = ar.IsEmpty() ? 100 : ar.front()-4;
|
||||
optgroup->label_width = m_label_width;
|
||||
|
||||
//Frequently changed parameters
|
||||
optgroup->m_on_change = [config](t_config_option_key opt_key, boost::any value){
|
||||
TabPrint* tab_print = nullptr;
|
||||
for (size_t i = 0; i < g_wxTabPanel->GetPageCount(); ++i) {
|
||||
@ -1067,17 +1074,20 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl
|
||||
|
||||
m_optgroups.push_back(optgroup);// ogFrequentlyChangingParameters
|
||||
|
||||
// Object List
|
||||
add_objects_list(parent, sizer);
|
||||
|
||||
// Frequently Object Settings
|
||||
optgroup = std::make_shared<ConfigOptionsGroup>(parent, _(L("Object Settings")), config);
|
||||
optgroup->label_width = 100;
|
||||
optgroup->set_grid_vgap(5);
|
||||
|
||||
def.label = L("Name");
|
||||
def.type = coString;
|
||||
def.tooltip = L("Object name");
|
||||
def.full_width = true;
|
||||
def.default_value = new ConfigOptionString{ "BlaBla_object.stl" };
|
||||
optgroup->append_single_option_line(Option(def, "object_name"));
|
||||
// def.label = L("Name");
|
||||
// def.type = coString;
|
||||
// def.tooltip = L("Object name");
|
||||
// def.full_width = true;
|
||||
// def.default_value = new ConfigOptionString{ "BlaBla_object.stl" };
|
||||
// optgroup->append_single_option_line(Option(def, "object_name"));
|
||||
|
||||
optgroup->set_flag(ogSIDE_OPTIONS_VERTICAL);
|
||||
optgroup->sidetext_width = 25;
|
||||
@ -1096,7 +1106,7 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl
|
||||
def.default_value = new ConfigOptionBool{ false };
|
||||
optgroup->append_single_option_line(Option(def, "place_on_bed"));
|
||||
|
||||
sizer->Add(optgroup->sizer, 0, wxEXPAND | wxLEFT, 20);
|
||||
sizer->Add(optgroup->sizer, 0, wxEXPAND | wxLEFT | wxTOP, 20);
|
||||
|
||||
m_optgroups.push_back(optgroup); // ogFrequentlyObjectSettings
|
||||
}
|
||||
@ -1151,7 +1161,8 @@ void update_mode()
|
||||
ConfigMenuIDs mode = get_view_mode();
|
||||
|
||||
// show_frequently_changed_parameters(mode >= ConfigMenuModeRegular);
|
||||
g_expert_mode_part_sizer->Show(mode == ConfigMenuModeExpert);
|
||||
// g_expert_mode_part_sizer->Show(mode == ConfigMenuModeExpert);
|
||||
g_object_list_sizer->Show(mode == ConfigMenuModeExpert);
|
||||
show_info_sizer(mode == ConfigMenuModeExpert);
|
||||
show_buttons(mode == ConfigMenuModeExpert);
|
||||
|
||||
|
@ -101,6 +101,7 @@ void set_objects_from_perl( wxWindow* parent,
|
||||
wxStaticBitmap *manifold_warning_icon);
|
||||
void set_show_print_info(bool show);
|
||||
void set_show_manifold_warning_icon(bool show);
|
||||
void set_objects_list_sizer(wxBoxSizer *objects_list_sizer);
|
||||
|
||||
AppConfig* get_app_config();
|
||||
wxApp* get_app();
|
||||
@ -121,7 +122,7 @@ const wxFont& bold_font();
|
||||
void open_model(wxWindow *parent, wxArrayString& input_files);
|
||||
|
||||
wxWindow* get_right_panel();
|
||||
const int& label_width();
|
||||
const size_t& label_width();
|
||||
|
||||
extern void add_menus(wxMenuBar *menu, int event_preferences_changed, int event_language_change);
|
||||
|
||||
|
@ -333,7 +333,9 @@ wxCollapsiblePane* add_collapsible_pane(wxWindow* parent, wxBoxSizer* sizer_pare
|
||||
|
||||
void add_objects_list(wxWindow* parent, wxBoxSizer* sizer)
|
||||
{
|
||||
sizer->Add(content_objects_list(parent), 1, wxEXPAND | wxALL, 0);
|
||||
const auto ol_sizer = content_objects_list(parent);
|
||||
sizer->Add(ol_sizer, 1, wxEXPAND | wxTOP, 20);
|
||||
set_objects_list_sizer(ol_sizer);
|
||||
}
|
||||
|
||||
void add_collapsible_panes(wxWindow* parent, wxBoxSizer* sizer)
|
||||
|
Loading…
Reference in New Issue
Block a user