From 7fd7d83470a1d28f2c1dfe5acd0d3a1eb631a836 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 29 Aug 2018 11:21:22 +0200 Subject: [PATCH 1/2] Updated PrusaDoubleSlider icons --- resources/icons/down_half_circle.png | Bin 506 -> 631 bytes resources/icons/left_half_circle.png | Bin 518 -> 651 bytes resources/icons/one_layer_lock_off.png | Bin 577 -> 1001 bytes resources/icons/one_layer_lock_on.png | Bin 528 -> 1106 bytes resources/icons/one_layer_unlock_off.png | Bin 508 -> 997 bytes resources/icons/one_layer_unlock_on.png | Bin 483 -> 1129 bytes resources/icons/right_half_circle.png | Bin 521 -> 654 bytes resources/icons/up_half_circle.png | Bin 517 -> 650 bytes xs/src/slic3r/GUI/wxExtensions.cpp | 12 ++++++++++-- xs/src/slic3r/GUI/wxExtensions.hpp | 10 +++++++++- 10 files changed, 19 insertions(+), 3 deletions(-) diff --git a/resources/icons/down_half_circle.png b/resources/icons/down_half_circle.png index 84aba5c3cdd7b54590874c1999593bb3da8b50fd..f86a2932c1da84cc5e4b9214b26e04a49542af73 100644 GIT binary patch delta 607 zcmV-l0-*i+1NQ`wBYy#fX+uL$b5ch_AW20-HZeIiHZ3wPF#rH4k#&*3FGEoj$3Ja} zhDrw=3?z*-205rH9Dk4UMwL=F#Vj*HNvx$E|B9UM+u!@1i zBF%Gd+oU3TUe39n_r2$wci*{SUruWovta--*}M@BO?a0hD}Uam7o2p8_t6#AOnrQQ zewMoS^?*&S_kF5Y{k(szWj$_cU~>wOX}XaYo)Vth%Ik{vg*{p-x-NVn+-t}Ig`boj ztMHrRWSQ-%r^i?f2ZcSt-sCTi{bDU;WQ2!>eVO#8Ry~jU6IVRDw4ikH4ot#?n83?4 zlLQGc$f(4COn=8uzr0bW-e0btBPX?*M4fF6Hb{~pPp_z((mgI~LiD&iX~_^%ckp+% zW@5-+`GRW(8ec8zvj>`vptNUM-zSz;It7Q!<)&Dx&lO?hUGzdt^BseG7cQ@BTI>w2 z3ef(nM~!G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$(XN^K%A4K4|hnAyKpC3#KlRDlnEn4B_UIdPL?0S2%eljJjkDxyXI}<|R9z{U= z5D!7UkG(fF_uZ+`_h+uQCMxDMcc~9cpKf_|H2uRhA1EGgaDK>7r@_gyJb>m%>ETBh z;;}X?vTq)R`EIl&^S@W%j;cTy)3DelB@Mqke**Xdz7DhOcAdVq00000NkvXXu0mjf Dl@;ZF diff --git a/resources/icons/one_layer_unlock_off.png b/resources/icons/one_layer_unlock_off.png index c3931f8b9d11ba5db566066820ac2afb40b87057..46fabfb0501592fb64bb87d32eaa658fc455941a 100644 GIT binary patch delta 986 zcmV<0110?Y1LX&h8Gi-<0028}NBRH&0flKpLr`;4M?xS;MME|*IW{&eGA=Oy04R}l zk-slPQ545NZHb0T2OSI~jWh;9C~4TxND&b!62;O!{UPa(m-i|nMuW9O2R~vVVllIc ze?TIUU^1|Zfy5%sb8g$DB6?oVxu5sF=bU%nxnN&TYZ%YQVJ1PL(6sKkIw$4|e!QK#NtuAd_(wVFhoZ45R@k|Iy9sGHI~E^9*c zxIAge5L0*XceZ9?$Y1$_YX%x$E$g!fnvS5fXIbATmQ^|hhs@=sSgX$!VdP!(LQV4> zgL@Y)uWMTD46X{${;WrhXjyWI+Y<@+IEU5`00IU{L_t(Ijg{2TOH@%52k_6E zH^T@%L{toNA%k1fMEeJ3-w&c~h?}$3 zFkowI%f`lrG)=Qac|6B=ECxxEjN%K1=I7__?0@W7Utbplf!Wzv!^6YY*4EVP^}l7c zk6U@nVF=F8&m9~bfHY0*?d@r|+gh#GWu=YbejZa@&++lGG);wJsIRY26h#V!f+&iF zVJHX!?RHzE(Z~|r&EtC4T3uaLuh*4IC3ACgip8S-{(h5_lTJ=fq-m-Ys`2%7z7EXCp#M zBqEf{hK=iva@i=C^YhK*I8HqE)yzBd%)HOM^O^e#4u?ah(|<{)(}6(1X0wIE;cPbB z>-A2jlV(^@&h>g732yjrv)k=_J|9QR<+5BZV~|=b77-?@UJ(j~j>n^EG#cX1=kru5 zC3Y+pqpio|5r6j;)H3mST%6HpluRbM0Oc87sZ@$aqkg|1*X#944xp}ayWQfDK`fKW z%w{w0$(=Ww4fb?8MWN&XN|-mHl}ZJb0M25uV5HcLOT!in-PN?fxP()$*HJ|)?EQYP zVd;}dB-FF;5zEo6!3G{+GQT4u>*#pd0}*+U+*mAe$Bp j23d%1xBKV+x!->P3f*1H1}T|400000NkvXXu0mjf3z6i! diff --git a/resources/icons/one_layer_unlock_on.png b/resources/icons/one_layer_unlock_on.png index 99e0db5c26b733887949d6e5fbe042f731e63214..265b926101933cce7995dccd8e0220bd8a862eea 100644 GIT binary patch delta 1119 zcmV-l1fcul1L+8m8Gi-<0028}NBRH&0flKpLr`;4M?xS;MME|*IW{&eGA=Oy04R}l zk-slPQ545NZHb0T2OSI~jWh;9C~4TxND&b!62;O!{UPa(m-i|nMuW9O2R~vVVllIc ze?TIUU^1|Zfy5%sb8g$DB6?oVxu5sF=bU%nxnN&TYZ%YQVJ1PL(6sKkIw$4|e!QK#NtuAd_(wVFhoZ45R@k|Iy9sGHI~E^9*c zxIAge5L0*XceZ9?$Y1$_YX%x$E$g!fnvS5fXIbATmQ^|hhs@=sSgX$!VdP!(LQV4> zgL@Y)uWMTD46X{${;WrhXjyWI+Y<@+IEU5`00N3hL_t(IjeV3oNLyhPhM(`o zke_?;C(4a9Vj9$dAO%UK$nSP4MHxYRxBH_z5 z>O!#>NCB_%`Fzx}ENt7R(P$711~E;Ov9U2GCnqi76|kg~k~ZWV@M3dw^Y!}rI{W+k zmp^N3czBppD%Ap>1Mihmr!M3%@FA1Qc*e)asee=|D5dD`?xs*Eu(7d$h_pd{eSOT$ z&DDViN~t9!A~%4-;^Jaxc6OHS?QPc9)=)~3NF?a*?`LIYg<7q4T}OMsZ4J1)y1E*& zZJX26Q%a?hyCaIlBBfG^R;zVotYWc9KA(>O_ch>-Wmy1Jt5rk?q>llWC*XzYF z41a>bAiA#O_xszRot+(kdtJcIa=8pZHk+kZs}YOENG6l`d_HttXJTT4sW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Vn+-t}Ig`boj ztMHrRWSQ-%r^i?f2ZcSt-sCTi{bDU;WQ2!>eVO#8Ry~jU6IVRDw4ikH4ot#?n83?4 zlLQGc$f(4COn=8uzr0bW-e0btBPX?*M4fF6Hb{~pPp_z((mgI~LiD&iX~_^%ckp+% zW@5-+`GRW(8ec8zvj>`vptNUM-zSz;It7Q!<)&Dx&lO?hUGzdt^BseG7cQ@BTI>w2 z3ef(nM~!G%a){d#3HUgN)(EuSLGx;5Zq!&!K8U0Th7Y?@VEgMT=p1eR~2Q zz`QqD^#umXxM43K3}i2`Xtds}SWUyE)iiC#-~@;F>fa80=fH{V`^66?_>z`U*!nAS zAdiEz#cvRw!ZP0Fjnl%N(8GuH2>-#MTcL~BeAB7|aE})aPj!IsfKELi@O%kC`x>bH z;07*qoM6N<$g5*CWi~s-t literal 521 zcmeAS@N?(olHy`uVBq!ia0vp^96&6Cc6VX;4}uH!E}sliR#xDc4m3&!jDK4c zWda3NOI#yLQW8s2t&)pUffR$0fuWJEfu*jIafqRXm7#%^fvK*6xs`!I#wxRV6b-rg zDVb@NxHU+A?>h|CAPKS|I6tkVJh3R1p}f3YFEcN@I61K(RWH9NefB#WDWD>GkfM;x zlAKfq_niFV;z|YoqQt!PR0ZeEqU4-Z1<&OCyyN$ICIFQl^>lFz(Fjid6Mz20e8+&! zM#rPgjRzObYix|}VU#rZx1L$+2Ybq2#z*=NInsv?2yBy5VQ2H<>2a7O*>STmf}_KK zePY541`|Q984FBU8bpejKVJUL!y`TUfYS=Dga+=8?`PPfelxc-&G2l$RiMGZD5kJ) zvur=pgfqLXD?}U^^H>*b5DYrFm_ejKYo3M3ANEJ<9dg23oe!ETlzFoJYGL+e^jW?| ziMjc|%?1JCh!6S#|5+ZDJLGWntZAxtU}F*J$YWz;csx%>XqWDSRX`6hc)I$ztaD0e F0sxp@rON;S diff --git a/resources/icons/up_half_circle.png b/resources/icons/up_half_circle.png index 9eea07fda7f4e2b7aa63a2370c2899b44106791a..aac6e32c3f307b8213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Bb@ E0N(4k1^@s6 diff --git a/xs/src/slic3r/GUI/wxExtensions.cpp b/xs/src/slic3r/GUI/wxExtensions.cpp index 8ee7881e3..a8ed45e07 100644 --- a/xs/src/slic3r/GUI/wxExtensions.cpp +++ b/xs/src/slic3r/GUI/wxExtensions.cpp @@ -750,8 +750,12 @@ unsigned int PrusaObjectDataViewModel::GetChildren(const wxDataViewItem &parent, return count; } -// ************************************** EXPERIMENTS *************************************** -PrusaDoubleSlider::PrusaDoubleSlider( wxWindow *parent, + +// ---------------------------------------------------------------------------- +// PrusaDoubleSlider +// ---------------------------------------------------------------------------- + +PrusaDoubleSlider::PrusaDoubleSlider(wxWindow *parent, wxWindowID id, int lowerValue, int higherValue, @@ -1449,5 +1453,9 @@ void PrusaLockButton::enter_button(const bool enter) Update(); } +// ************************************** EXPERIMENTS *************************************** + // ***************************************************************************** + + diff --git a/xs/src/slic3r/GUI/wxExtensions.hpp b/xs/src/slic3r/GUI/wxExtensions.hpp index 465101e3f..62e4f4f15 100644 --- a/xs/src/slic3r/GUI/wxExtensions.hpp +++ b/xs/src/slic3r/GUI/wxExtensions.hpp @@ -495,7 +495,12 @@ public: private: wxString m_value; }; -// ******************************* EXPERIMENTS ********************************************** + + +// ---------------------------------------------------------------------------- +// PrusaDoubleSlider +// ---------------------------------------------------------------------------- + enum SelectedSlider { ssUndef, ssLower, @@ -670,6 +675,9 @@ private: int m_lock_icon_dim; }; + + +// ******************************* EXPERIMENTS ********************************************** // ****************************************************************************************** From 6c1b52afa2c0e4d5c6ff3063bcd67dd42cbcbedc Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 29 Aug 2018 13:11:30 +0200 Subject: [PATCH 2/2] Deleted "scale" column from object list --- lib/Slic3r/GUI/Plater.pm | 4 +-- xs/src/slic3r/GUI/GUI_ObjectParts.cpp | 39 +++++++++++---------------- xs/src/slic3r/GUI/GUI_ObjectParts.hpp | 5 ++-- xs/src/slic3r/GUI/wxExtensions.cpp | 24 +++++------------ xs/src/slic3r/GUI/wxExtensions.hpp | 19 +++++-------- xs/xsp/GUI.xsp | 7 ++--- 6 files changed, 37 insertions(+), 61 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index eb95bc4d4..1a769a87e 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -136,7 +136,7 @@ sub new { $_->set_scaling_factor($scale) for @{ $model_object->instances }; # Set object scale on c++ side - Slic3r::GUI::set_object_scale($obj_idx, $model_object->instances->[0]->scaling_factor * 100); +# Slic3r::GUI::set_object_scale($obj_idx, $model_object->instances->[0]->scaling_factor * 100); # $object->transform_thumbnail($self->{model}, $obj_idx); @@ -1278,7 +1278,7 @@ sub changescale { } # Set object scale on c++ side - Slic3r::GUI::set_object_scale($obj_idx, $scale); +# Slic3r::GUI::set_object_scale($obj_idx, $scale); $scale /= 100; # turn percent into factor my $variation = $scale / $model_instance->scaling_factor; diff --git a/xs/src/slic3r/GUI/GUI_ObjectParts.cpp b/xs/src/slic3r/GUI/GUI_ObjectParts.cpp index 7f3b049cd..94555f50e 100644 --- a/xs/src/slic3r/GUI/GUI_ObjectParts.cpp +++ b/xs/src/slic3r/GUI/GUI_ObjectParts.cpp @@ -226,7 +226,7 @@ wxDataViewColumn* object_ctrl_create_extruder_column(int extruders_count) choices.Add(wxString::Format("%d", i)); wxDataViewChoiceRenderer *c = new wxDataViewChoiceRenderer(choices, wxDATAVIEW_CELL_EDITABLE, wxALIGN_CENTER_HORIZONTAL); - wxDataViewColumn* column = new wxDataViewColumn(_(L("Extruder")), c, 3, 60, wxALIGN_CENTER_HORIZONTAL, wxDATAVIEW_COL_RESIZABLE); + wxDataViewColumn* column = new wxDataViewColumn(_(L("Extruder")), c, 2, 60, wxALIGN_CENTER_HORIZONTAL, wxDATAVIEW_COL_RESIZABLE); return column; } @@ -246,7 +246,7 @@ void create_objects_ctrl(wxWindow* win, wxBoxSizer*& objects_sz) #endif // wxUSE_DRAG_AND_DROP && wxUSE_UNICODE // column 0(Icon+Text) of the view control: - m_objects_ctrl->AppendIconTextColumn(_(L("Name")), 0, wxDATAVIEW_CELL_INERT, 120, + m_objects_ctrl->AppendIconTextColumn(_(L("Name")), 0, wxDATAVIEW_CELL_INERT, 200, wxALIGN_LEFT, wxDATAVIEW_COL_RESIZABLE); // column 1 of the view control: @@ -254,14 +254,10 @@ void create_objects_ctrl(wxWindow* win, wxBoxSizer*& objects_sz) wxALIGN_CENTER_HORIZONTAL, wxDATAVIEW_COL_RESIZABLE); // column 2 of the view control: - m_objects_ctrl->AppendTextColumn(_(L("Scale")), 2, wxDATAVIEW_CELL_INERT, 55, - wxALIGN_CENTER_HORIZONTAL, wxDATAVIEW_COL_RESIZABLE); - - // column 3 of the view control: m_objects_ctrl->AppendColumn(object_ctrl_create_extruder_column(4)); - // column 4 of the view control: - m_objects_ctrl->AppendBitmapColumn(" ", 4, wxDATAVIEW_CELL_INERT, 25, + // column 3 of the view control: + m_objects_ctrl->AppendBitmapColumn(" ", 3, wxDATAVIEW_CELL_INERT, 25, wxALIGN_CENTER_HORIZONTAL, wxDATAVIEW_COL_RESIZABLE); } @@ -659,8 +655,7 @@ void show_collpane_settings(bool expert_mode) void add_object_to_list(const std::string &name, ModelObject* model_object) { wxString item_name = name; - int scale = model_object->instances[0]->scaling_factor * 100; - auto item = m_objects_model->Add(item_name, model_object->instances.size(), scale); + auto item = m_objects_model->Add(item_name, model_object->instances.size()); m_objects_ctrl->Select(item); // Add error icon if detected auto-repaire @@ -697,6 +692,8 @@ void delete_object_from_list() // m_objects_ctrl->Select(m_objects_model->Delete(item)); m_objects_model->Delete(item); + part_selection_changed(); + // if (m_objects_model->IsEmpty()) // m_collpane_settings->Show(false); } @@ -704,6 +701,8 @@ void delete_object_from_list() void delete_all_objects_from_list() { m_objects_model->DeleteAll(); + + part_selection_changed(); // m_collpane_settings->Show(false); } @@ -713,12 +712,6 @@ void set_object_count(int idx, int count) m_objects_ctrl->Refresh(); } -void set_object_scale(int idx, int scale) -{ - m_objects_model->SetValue(wxString::Format("%d%%", scale), idx, 2); - m_objects_ctrl->Refresh(); -} - void unselect_objects() { if (!m_objects_ctrl->GetSelection()) @@ -834,10 +827,10 @@ void object_ctrl_key_event(wxKeyEvent& event) void object_ctrl_item_value_change(wxDataViewEvent& event) { - if (event.GetColumn() == 3) + if (event.GetColumn() == 2) { wxVariant variant; - m_objects_model->GetValue(variant, event.GetItem(), 3); + m_objects_model->GetValue(variant, event.GetItem(), 2); #ifdef __WXOSX__ g_selected_extruder = variant.GetString(); #else // --> for Linux @@ -930,8 +923,8 @@ void update_settings_list() no_updates.reset(nullptr); #endif - get_right_panel()->Layout(); - get_right_panel()->GetParent()->Layout(); + /*get_right_panel()*/parent->Layout(); + get_right_panel()->GetParent()->GetParent()->Layout(); } void get_settings_choice(wxMenu *menu, int id, bool is_part) @@ -1523,7 +1516,7 @@ void part_selection_changed() void set_extruder_column_hidden(bool hide) { - m_objects_ctrl->GetColumn(3)->SetHidden(hide); + m_objects_ctrl->GetColumn(2)->SetHidden(hide); } void update_extruder_in_config(const wxString& selection) @@ -1668,9 +1661,9 @@ void update_objects_list_extruder_column(int extruders_count) extruders_count = 1; // delete old 3rd column - m_objects_ctrl->DeleteColumn(m_objects_ctrl->GetColumn(3)); + m_objects_ctrl->DeleteColumn(m_objects_ctrl->GetColumn(2)); // insert new created 3rd column - m_objects_ctrl->InsertColumn(3, object_ctrl_create_extruder_column(extruders_count)); + m_objects_ctrl->InsertColumn(2, object_ctrl_create_extruder_column(extruders_count)); // set show/hide for this column set_extruder_column_hidden(extruders_count <= 1); } diff --git a/xs/src/slic3r/GUI/GUI_ObjectParts.hpp b/xs/src/slic3r/GUI/GUI_ObjectParts.hpp index f8b08d3a6..82bfe4a6c 100644 --- a/xs/src/slic3r/GUI/GUI_ObjectParts.hpp +++ b/xs/src/slic3r/GUI/GUI_ObjectParts.hpp @@ -9,6 +9,7 @@ class wxArrayString; class wxMenu; class wxDataViewEvent; class wxKeyEvent; +class wxControl; namespace Slic3r { class ModelObject; @@ -61,8 +62,6 @@ void delete_object_from_list(); void delete_all_objects_from_list(); // Set count of object on c++ side void set_object_count(int idx, int count); -// Set object scale on c++ side -void set_object_scale(int idx, int scale); // Unselect all objects in the list on c++ side void unselect_objects(); // Select current object in the list on c++ side @@ -70,6 +69,8 @@ void select_current_object(int idx); // Remove objects/sub-object from the list void remove(); +//void create_double_slider(wxWindow* parent, wxControl* slider); + void object_ctrl_selection_changed(); void object_ctrl_context_menu(); void object_ctrl_key_event(wxKeyEvent& event); diff --git a/xs/src/slic3r/GUI/wxExtensions.cpp b/xs/src/slic3r/GUI/wxExtensions.cpp index a8ed45e07..e646ed0ec 100644 --- a/xs/src/slic3r/GUI/wxExtensions.cpp +++ b/xs/src/slic3r/GUI/wxExtensions.cpp @@ -362,7 +362,7 @@ void PrusaObjectDataViewModelNode::set_part_action_icon() { // PrusaObjectDataViewModel // ---------------------------------------------------------------------------- -wxDataViewItem PrusaObjectDataViewModel::Add(wxString &name) +wxDataViewItem PrusaObjectDataViewModel::Add(const wxString &name) { auto root = new PrusaObjectDataViewModelNode(name); m_objects.push_back(root); @@ -373,9 +373,9 @@ wxDataViewItem PrusaObjectDataViewModel::Add(wxString &name) return child; } -wxDataViewItem PrusaObjectDataViewModel::Add(wxString &name, int instances_count, int scale) +wxDataViewItem PrusaObjectDataViewModel::Add(const wxString &name, const int instances_count/*, int scale*/) { - auto root = new PrusaObjectDataViewModelNode(name, instances_count, scale); + auto root = new PrusaObjectDataViewModelNode(name, instances_count); m_objects.push_back(root); // notify control wxDataViewItem child((void*)root); @@ -562,15 +562,6 @@ wxString PrusaObjectDataViewModel::GetCopy(const wxDataViewItem &item) const return node->m_copy; } -wxString PrusaObjectDataViewModel::GetScale(const wxDataViewItem &item) const -{ - PrusaObjectDataViewModelNode *node = (PrusaObjectDataViewModelNode*)item.GetID(); - if (!node) // happens if item.IsOk()==false - return wxEmptyString; - - return node->m_scale; -} - wxIcon& PrusaObjectDataViewModel::GetIcon(const wxDataViewItem &item) const { PrusaObjectDataViewModelNode *node = (PrusaObjectDataViewModelNode*)item.GetID(); @@ -592,12 +583,9 @@ void PrusaObjectDataViewModel::GetValue(wxVariant &variant, const wxDataViewItem variant = node->m_copy; break; case 2: - variant = node->m_scale; - break; - case 3: variant = node->m_extruder; break; - case 4: + case 3: variant << node->m_action_icon; break; default: @@ -1016,8 +1004,8 @@ wxString PrusaDoubleSlider::get_label(const SelectedSlider& selection) const const wxString str = m_values.empty() ? wxNumberFormatter::ToString(m_label_koef*value, 2, wxNumberFormatter::Style_None) : - wxNumberFormatter::ToString(m_values[value], 2, wxNumberFormatter::Style_None); - return wxString::Format("%s\n(%d)", str, value); + wxNumberFormatter::ToString(m_values[value].second, 2, wxNumberFormatter::Style_None); + return wxString::Format("%s\n(%d)", str, m_values.empty() ? value : m_values[value].first); } void PrusaDoubleSlider::draw_thumb_text(wxDC& dc, const wxPoint& pos, const SelectedSlider& selection) const diff --git a/xs/src/slic3r/GUI/wxExtensions.hpp b/xs/src/slic3r/GUI/wxExtensions.hpp index 62e4f4f15..76e59f2eb 100644 --- a/xs/src/slic3r/GUI/wxExtensions.hpp +++ b/xs/src/slic3r/GUI/wxExtensions.hpp @@ -157,11 +157,10 @@ class PrusaObjectDataViewModelNode MyObjectTreeModelNodePtrArray m_children; wxIcon m_empty_icon; public: - PrusaObjectDataViewModelNode(const wxString &name, int instances_count=1, int scale=100) { + PrusaObjectDataViewModelNode(const wxString &name, const int instances_count=1) { m_parent = NULL; m_name = name; m_copy = wxString::Format("%d", instances_count); - m_scale = wxString::Format("%d%%", scale); m_type = "object"; m_volume_id = -1; #ifdef __WXGTK__ @@ -181,7 +180,6 @@ public: m_parent = parent; m_name = sub_obj_name; m_copy = wxEmptyString; - m_scale = wxEmptyString; m_icon = icon; m_type = "volume"; m_volume_id = volume_id; @@ -203,7 +201,6 @@ public: wxString m_name; wxIcon& m_icon = m_empty_icon; wxString m_copy; - wxString m_scale; std::string m_type; int m_volume_id; bool m_container = false; @@ -270,12 +267,9 @@ public: m_copy = variant.GetString(); return true; case 2: - m_scale = variant.GetString(); - return true; - case 3: m_extruder = variant.GetString(); return true; - case 4: + case 3: m_action_icon << variant; return true; default: @@ -349,8 +343,8 @@ public: delete object; } - wxDataViewItem Add(wxString &name); - wxDataViewItem Add(wxString &name, int instances_count, int scale); + wxDataViewItem Add(const wxString &name); + wxDataViewItem Add(const wxString &name, const int instances_count); wxDataViewItem AddChild(const wxDataViewItem &parent_item, const wxString &name, const wxIcon& icon, @@ -368,7 +362,6 @@ public: wxString GetName(const wxDataViewItem &item) const; wxString GetCopy(const wxDataViewItem &item) const; - wxString GetScale(const wxDataViewItem &item) const; wxIcon& GetIcon(const wxDataViewItem &item) const; // helper methods to change the model @@ -542,7 +535,7 @@ public: void SetKoefForLabels(const double koef) { m_label_koef = koef; } - void SetSliderValues(const std::vector& values) { + void SetSliderValues(const std::vector>& values) { m_values = values; } @@ -638,7 +631,7 @@ private: std::vector line_pens; std::vector segm_pens; std::set m_ticks; - std::vector m_values; + std::vector> m_values; }; diff --git a/xs/xsp/GUI.xsp b/xs/xsp/GUI.xsp index b9183af1d..c18fce44d 100644 --- a/xs/xsp/GUI.xsp +++ b/xs/xsp/GUI.xsp @@ -146,9 +146,6 @@ void delete_all_objects_from_list() void set_object_count(int idx, int count) %code%{ Slic3r::GUI::set_object_count(idx, count); %}; -void set_object_scale(int idx, int scale) - %code%{ Slic3r::GUI::set_object_scale(idx, scale); %}; - void unselect_objects() %code%{ Slic3r::GUI::unselect_objects(); %}; @@ -185,3 +182,7 @@ void register_on_request_update_callback(SV* callback) void deregister_on_request_update_callback() %code%{ Slic3r::GUI::g_on_request_update_callback.deregister_callback(); %}; +//void create_double_slider(SV *ui_parent, SV *ui_ds) +// %code%{ Slic3r::GUI::create_double_slider( (wxWindow*)wxPli_sv_2_object(aTHX_ ui_parent, "Wx::Window"), +// (wxControl*)wxPli_sv_2_object(aTHX_ ui_ds, "Wx::Control")); %}; +