mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 10:47:50 -06:00
Fixed OSX build and a bug when for part is able to add "layer_height" option
This commit is contained in:
parent
401999b68b
commit
67ed89c240
2 changed files with 18 additions and 4 deletions
|
@ -4,18 +4,22 @@
|
||||||
#include "GUI_ObjectSettings.hpp"
|
#include "GUI_ObjectSettings.hpp"
|
||||||
#include "wxExtensions.hpp"
|
#include "wxExtensions.hpp"
|
||||||
|
|
||||||
|
#ifdef __WXOSX__
|
||||||
|
#include "..\libslic3r\PrintConfig.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
class wxBoxSizer;
|
class wxBoxSizer;
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
class ModelObject;
|
class ModelObject;
|
||||||
|
|
||||||
|
namespace GUI {
|
||||||
|
class ConfigOptionsGroup;
|
||||||
|
|
||||||
typedef double coordf_t;
|
typedef double coordf_t;
|
||||||
typedef std::pair<coordf_t, coordf_t> t_layer_height_range;
|
typedef std::pair<coordf_t, coordf_t> t_layer_height_range;
|
||||||
typedef std::map<t_layer_height_range, DynamicPrintConfig> t_layer_config_ranges;
|
typedef std::map<t_layer_height_range, DynamicPrintConfig> t_layer_config_ranges;
|
||||||
|
|
||||||
namespace GUI {
|
|
||||||
class ConfigOptionsGroup;
|
|
||||||
|
|
||||||
class LayerRangeEditor : public wxTextCtrl
|
class LayerRangeEditor : public wxTextCtrl
|
||||||
{
|
{
|
||||||
bool m_enter_pressed { false };
|
bool m_enter_pressed { false };
|
||||||
|
|
|
@ -1035,7 +1035,17 @@ void ObjectList::get_settings_choice(const wxString& category_name)
|
||||||
|
|
||||||
void ObjectList::get_freq_settings_choice(const wxString& bundle_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);
|
assert(m_config);
|
||||||
auto opt_keys = m_config->keys();
|
auto opt_keys = m_config->keys();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue