mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 03:59:04 +08:00
Merge branch 'master' of https://github.com/prusa3d/Slic3r
This commit is contained in:
commit
58acbd6bc9
@ -1223,7 +1223,8 @@ namespace Slic3r {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// see http://reprap.org/wiki/G-code#M203:_Set_maximum_feedrate
|
// see http://reprap.org/wiki/G-code#M203:_Set_maximum_feedrate
|
||||||
float factor = (dialect == gcfMarlin) ? 1.0f : MMMIN_TO_MMSEC;
|
// http://smoothieware.org/supported-g-codes
|
||||||
|
float factor = (dialect == gcfMarlin || dialect == gcfSmoothie) ? 1.0f : MMMIN_TO_MMSEC;
|
||||||
|
|
||||||
if (line.has_x())
|
if (line.has_x())
|
||||||
set_axis_max_feedrate(X, line.x() * factor);
|
set_axis_max_feedrate(X, line.x() * factor);
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
#define ENABLE_REMOVE_TABS_FROM_PLATER (1 && ENABLE_1_42_0)
|
#define ENABLE_REMOVE_TABS_FROM_PLATER (1 && ENABLE_1_42_0)
|
||||||
// Constrains the camera target into the scene bounding box
|
// Constrains the camera target into the scene bounding box
|
||||||
#define ENABLE_CONSTRAINED_CAMERA_TARGET (1 && ENABLE_1_42_0)
|
#define ENABLE_CONSTRAINED_CAMERA_TARGET (1 && ENABLE_1_42_0)
|
||||||
|
// Use wxDataViewRender instead of wxDataViewCustomRenderer
|
||||||
|
#define ENABLE_NONCUSTOM_DATA_VIEW_RENDERING (0 && ENABLE_1_42_0)
|
||||||
|
|
||||||
#endif // _technologies_h_
|
#endif // _technologies_h_
|
||||||
|
|
||||||
|
@ -1228,14 +1228,6 @@ void PrusaObjectDataViewModel::SetVolumeType(const wxDataViewItem &item, const i
|
|||||||
ItemChanged(item);
|
ItemChanged(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
PrusaBitmapTextRenderer::PrusaBitmapTextRenderer(wxDataViewCellMode mode /*= wxDATAVIEW_CELL_EDITABLE*/,
|
|
||||||
int align /*= wxDVR_DEFAULT_ALIGNMENT*/):
|
|
||||||
wxDataViewRenderer(wxT("PrusaDataViewBitmapText"), mode, align)
|
|
||||||
{
|
|
||||||
SetMode(mode);
|
|
||||||
SetAlignment(align);
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// PrusaDataViewBitmapText
|
// PrusaDataViewBitmapText
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -1248,6 +1240,16 @@ IMPLEMENT_VARIANT_OBJECT(PrusaDataViewBitmapText)
|
|||||||
// PrusaIconTextRenderer
|
// PrusaIconTextRenderer
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
|
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
PrusaBitmapTextRenderer::PrusaBitmapTextRenderer(wxDataViewCellMode mode /*= wxDATAVIEW_CELL_EDITABLE*/,
|
||||||
|
int align /*= wxDVR_DEFAULT_ALIGNMENT*/):
|
||||||
|
wxDataViewRenderer(wxT("PrusaDataViewBitmapText"), mode, align)
|
||||||
|
{
|
||||||
|
SetMode(mode);
|
||||||
|
SetAlignment(align);
|
||||||
|
}
|
||||||
|
#endif // ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
|
||||||
bool PrusaBitmapTextRenderer::SetValue(const wxVariant &value)
|
bool PrusaBitmapTextRenderer::SetValue(const wxVariant &value)
|
||||||
{
|
{
|
||||||
m_value << value;
|
m_value << value;
|
||||||
@ -1259,12 +1261,12 @@ bool PrusaBitmapTextRenderer::GetValue(wxVariant& WXUNUSED(value)) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING && wxUSE_ACCESSIBILITY
|
||||||
wxString PrusaBitmapTextRenderer::GetAccessibleDescription() const
|
wxString PrusaBitmapTextRenderer::GetAccessibleDescription() const
|
||||||
{
|
{
|
||||||
return m_value.GetText();
|
return m_value.GetText();
|
||||||
}
|
}
|
||||||
#endif // wxUSE_ACCESSIBILITY
|
#endif // wxUSE_ACCESSIBILITY && ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
|
||||||
bool PrusaBitmapTextRenderer::Render(wxRect rect, wxDC *dc, int state)
|
bool PrusaBitmapTextRenderer::Render(wxRect rect, wxDC *dc, int state)
|
||||||
{
|
{
|
||||||
|
@ -518,19 +518,26 @@ public:
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// PrusaBitmapTextRenderer
|
// PrusaBitmapTextRenderer
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
class PrusaBitmapTextRenderer : public wxDataViewRenderer//CustomRenderer
|
class PrusaBitmapTextRenderer : public wxDataViewRenderer
|
||||||
|
#else
|
||||||
|
class PrusaBitmapTextRenderer : public wxDataViewCustomRenderer
|
||||||
|
#endif //ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PrusaBitmapTextRenderer(wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
|
PrusaBitmapTextRenderer(wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
|
||||||
int align = wxDVR_DEFAULT_ALIGNMENT);//:
|
int align = wxDVR_DEFAULT_ALIGNMENT
|
||||||
// wxDataViewRenderer/*CustomRenderer*/(wxT("PrusaDataViewBitmapText"), mode, align) {}
|
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
);
|
||||||
|
#else
|
||||||
|
) : wxDataViewCustomRenderer(wxT("PrusaDataViewBitmapText"), mode, align) {}
|
||||||
|
#endif //ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
|
||||||
bool SetValue(const wxVariant &value);
|
bool SetValue(const wxVariant &value);
|
||||||
bool GetValue(wxVariant &value) const;
|
bool GetValue(wxVariant &value) const;
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING && wxUSE_ACCESSIBILITY
|
||||||
virtual wxString GetAccessibleDescription() const override;
|
virtual wxString GetAccessibleDescription() const override;
|
||||||
#endif // wxUSE_ACCESSIBILITY
|
#endif // wxUSE_ACCESSIBILITY && ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
|
||||||
virtual bool Render(wxRect cell, wxDC *dc, int state);
|
virtual bool Render(wxRect cell, wxDC *dc, int state);
|
||||||
virtual wxSize GetSize() const;
|
virtual wxSize GetSize() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user