This article describes how to configure the input needed to perform certain edit actions on the map. As an example, we show you how to use a right mouse click to remove a point from a polyline instead of the default CTRL key + mouse left click combination.
The EditSettings
customizations aren’t limited to changes of key combinations.
For example, you can also change:
-
The appearance of the handles
-
The style of the outline for handles that manipulate an outline
-
The style used for the visual aid, for example a vertical line that connects a handle with the terrain
-
The style used for the shadow
-
The mouse button
-
The modifier key
-
The mouse cursor
For more information, see the API documentation for the EditSettings
.
Step 1 - Change the settings
If we want to change the default key combination for all delete actions, we must configure the EditSettings
the Editor uses.
To do so, we create the default edit settings, and call the methods that adapt what we want.
auto settings = std::make_shared<EditSettings>(); settings->setRemoveModifierKeys(ModifierKeys::none()); settings->setRemoveButton(MouseButton::right());