Skip to content

Commit

Permalink
#6114: Block double-click events originating from the MaterialsList
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Oct 6, 2022
1 parent 30cbbcf commit ff9ea73
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions radiant/ui/modelselector/MaterialsList.cpp
Expand Up @@ -54,6 +54,10 @@ MaterialsList::MaterialsList(wxWindow* parent, const RenderSystemPtr& renderSyst
Bind(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, &MaterialsList::onShaderToggled, this);
Bind(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, &MaterialsList::onContextMenu, this);

// Block all double-click events originating from this view, to not confuse
// parent widgets with double-click events
Bind(wxEVT_DATAVIEW_ITEM_ACTIVATED, [](wxDataViewEvent& ev) { ev.StopPropagation(); });

// Construct the context menu
_contextMenu->addItem(
new wxutil::IconTextMenuItem(_(SHOW_MATERIAL_DEF_TEXT), SHOW_MATERIAL_DEF_ICON),
Expand Down

0 comments on commit ff9ea73

Please sign in to comment.