242{
243 wxGridCellEditorEvtHandler* evtHandler = NULL;
244 if (m_control)
245 {
246
248 evtHandler = static_cast<wxGridCellEditorEvtHandler*>(m_control->GetEventHandler());
249 }
250
251
252 if (evtHandler)
253 evtHandler->SetInSetFocus(true);
254
255
256 ObjectGridTable *table =
dynamic_cast<ObjectGridTable *
>(
grid->GetTable());
257 ObjectGridTable::ObjectGridCol* grid_col = table->get_grid_col(col);
258 ObjectGridTable::ObjectGridRow* grid_row = table->get_grid_row(row - 1);
260 ConfigOptionInt& option_value = dynamic_cast<ConfigOptionInt&>(option);
261 if ((option_value.value - 1) < grid_col->choice_count) {
262
263 int index = (option_value.value > 0) ? option_value.value - 1 : 0;
264 m_value = grid_col->choices[index];
265
266 }
267
268
269
270 int pos =
Combo()->FindString(m_value);
271 if (pos == wxNOT_FOUND)
pos = 0;
273
275
276#ifdef __WXOSX_COCOA__
277
278
279
280
281
282#endif
283
284 if (evtHandler)
285 {
286
287
288#if !defined(__WXGTK20__)
289
290#endif
291 }
292}
void SetSelection(int n) override
Definition ComboBox.cpp:102
void OnComboCloseUp(wxCommandEvent &evt)
Definition GUI_ObjectTable.cpp:236
::ComboBox * Combo() const
Definition GUI_ObjectTable.hpp:119
GridColType
Definition GUI_ObjectTable.hpp:294
Vec3d pos(const Pt &p)
Definition ReprojectPointsOnMesh.hpp:16
std::vector< ArithmeticOnly< T > > grid(const T &start, const T &stop, const T &stride)
A set of equidistant values starting from 'start' (inclusive), ending in the closest multiple of 'str...
Definition MTUtils.hpp:127