diff --git a/src/gui/EventMappingWidget.cxx b/src/gui/EventMappingWidget.cxx index 57121ad68..584365b58 100644 --- a/src/gui/EventMappingWidget.cxx +++ b/src/gui/EventMappingWidget.cxx @@ -128,7 +128,7 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font, addFocusWidget(myComboButton); VariantList combolist = instance().eventHandler().getComboList(mode); - myComboDialog = new ComboDialog(boss, font, combolist); + myComboDialog = make_unique(boss, font, combolist); } // Show message for currently selected event diff --git a/src/gui/EventMappingWidget.hxx b/src/gui/EventMappingWidget.hxx index 6cab3f03e..fb7d8c603 100644 --- a/src/gui/EventMappingWidget.hxx +++ b/src/gui/EventMappingWidget.hxx @@ -90,7 +90,7 @@ class EventMappingWidget : public Widget, public CommandSender StringListWidget* myActionsList{nullptr}; EditTextWidget* myKeyMapping{nullptr}; - ComboDialog* myComboDialog{nullptr}; + unique_ptr myComboDialog; // Since this widget can be used for different collections of events, // we need to specify exactly which group of events we are remapping