Improvements for 15902766d0

This commit is contained in:
YuSanka 2019-10-02 13:05:34 +02:00
parent d87f2d11ae
commit 4171a6a80d
2 changed files with 13 additions and 10 deletions

View File

@ -839,7 +839,8 @@ void ObjectList::list_manipulation(bool evt_context_menu/* = false*/)
fix_through_netfabb();
}
}
else if (/*wxOSX &&*/evt_context_menu && title == _("Extruder"))
// workaround for extruder editing under OSX
else if (wxOSX && evt_context_menu && title == _("Extruder"))
extruder_editing();
#ifndef __WXMSW__
@ -895,14 +896,11 @@ void ObjectList::extruder_editing()
const int column_width = GetColumn(colExtruder)->GetWidth();
wxPoint pos = get_mouse_position_in_control();
pos.y -= 2*GetTextExtent("m").y;
wxWindow* parent = this;//this->GetMainWindow();
pos.x = GetColumn(colName)->GetWidth() + GetColumn(colPrint)->GetWidth();
// pos.y -= 2*GetTextExtent("m").y;
if (!m_extruder_editor)
m_extruder_editor = new wxBitmapComboBox(parent, wxID_ANY, wxEmptyString,
pos, wxSize(column_width, -1),
m_extruder_editor = new wxBitmapComboBox(this, wxID_ANY, wxEmptyString, pos, wxSize(column_width, -1),
0, nullptr, wxCB_READONLY);
else
{

View File

@ -580,8 +580,13 @@ private:
class BitmapChoiceRenderer : public wxDataViewCustomRenderer
{
public:
BitmapChoiceRenderer(wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
int align = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL
BitmapChoiceRenderer(wxDataViewCellMode mode =
#ifdef __WXOSX__
wxDATAVIEW_CELL_INERT
#else
wxDATAVIEW_CELL_EDITABLE
#endif
,int align = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL
) : wxDataViewCustomRenderer(wxT("DataViewBitmapText"), mode, align) {}
bool SetValue(const wxVariant& value);