Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2020-03-04 15:47:35 +0300
committerYuSanka <yusanka@gmail.com>2020-03-04 15:47:35 +0300
commitfc453df38fee744b0ea9e60af51aafe136d7678e (patch)
tree595d57f62b5ccafefb2f8482d3d8b7d4e4826866 /src/slic3r/GUI/OptionsGroup.cpp
parenta256cc95149c9fbac2a13bdd0ab8aecd23480285 (diff)
Implemented "Detach preset from system" button
Diffstat (limited to 'src/slic3r/GUI/OptionsGroup.cpp')
-rw-r--r--src/slic3r/GUI/OptionsGroup.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp
index f0b108bd7..d14bdd9a4 100644
--- a/src/slic3r/GUI/OptionsGroup.cpp
+++ b/src/slic3r/GUI/OptionsGroup.cpp
@@ -113,7 +113,11 @@ void OptionsGroup::add_undo_buttuns_to_sizer(wxSizer* sizer, const t_field& fiel
}
void OptionsGroup::append_line(const Line& line, wxStaticText** full_Label/* = nullptr*/) {
- if ( (line.sizer != nullptr || line.widget != nullptr) && line.full_width) {
+ if ( line.full_width && (
+ line.sizer != nullptr ||
+ line.widget != nullptr ||
+ !line.get_extra_widgets().empty() )
+ ) {
if (line.sizer != nullptr) {
sizer->Add(line.sizer, 0, wxEXPAND | wxALL, wxOSX ? 0 : 15);
return;
@@ -122,6 +126,17 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** full_Label/* = n
sizer->Add(line.widget(this->ctrl_parent()), 0, wxEXPAND | wxALL, wxOSX ? 0 : 15);
return;
}
+ if (!line.get_extra_widgets().empty()) {
+ const auto h_sizer = new wxBoxSizer(wxHORIZONTAL);
+ sizer->Add(h_sizer, 1, wxEXPAND | wxALL, wxOSX ? 0 : 15);
+
+ bool is_first_item = true;
+ for (auto extra_widget : line.get_extra_widgets()) {
+ h_sizer->Add(extra_widget(this->ctrl_parent()), is_first_item ? 1 : 0, wxLEFT, 15);
+ is_first_item = false;
+ }
+ return;
+ }
}
auto option_set = line.get_options();