Fixed OSX build and a bug when for part is able to add "layer_height" option

This commit is contained in:
YuSanka 2019-06-05 13:52:53 +02:00
parent 401999b68b
commit 67ed89c240
2 changed files with 18 additions and 4 deletions

View file

@ -4,18 +4,22 @@
#include "GUI_ObjectSettings.hpp"
#include "wxExtensions.hpp"
#ifdef __WXOSX__
#include "..\libslic3r\PrintConfig.hpp"
#endif
class wxBoxSizer;
namespace Slic3r {
class ModelObject;
namespace GUI {
class ConfigOptionsGroup;
typedef double coordf_t;
typedef std::pair<coordf_t, coordf_t> t_layer_height_range;
typedef std::map<t_layer_height_range, DynamicPrintConfig> t_layer_config_ranges;
namespace GUI {
class ConfigOptionsGroup;
class LayerRangeEditor : public wxTextCtrl
{
bool m_enter_pressed { false };

View file

@ -1035,7 +1035,17 @@ void ObjectList::get_settings_choice(const wxString& category_name)
void ObjectList::get_freq_settings_choice(const wxString& bundle_name)
{
const std::vector<std::string>& options = get_options_for_bundle(bundle_name);
std::vector<std::string> options = get_options_for_bundle(bundle_name);
/* Because of we couldn't edited layer_height for ItVolume and itLayer from settings list,
* correct options according to the selected item type :
* remove "layer_height" option
*/
if (m_objects_model->GetItemType(GetSelection()) & (itVolume | itLayer) && bundle_name == _("Layers and Perimeters")) {
const auto layer_height_it = std::find(options.begin(), options.end(), "layer_height");
if (layer_height_it != options.end())
options.erase(layer_height_it);
}
assert(m_config);
auto opt_keys = m_config->keys();