Add option to disable double-click to select a grid tile (fix #1901)

This commit is contained in:
David Capello 2018-11-15 19:17:19 -03:00
parent 9b2889ef66
commit d8b95c30e8
4 changed files with 6 additions and 1 deletions

View File

@ -229,6 +229,7 @@
<option id="rotation_algorithm" type="app::tools::RotationAlgorithm" default="app::tools::RotationAlgorithm::DEFAULT" />
<option id="modify_selection_quantity" type="int" default="1" />
<option id="modify_selection_brush" type="BrushType" default="BrushType::CIRCLE" />
<option id="doubleclick_select_tile" type="bool" default="true" />
</section>
<section id="quantization">
<option id="with_alpha" type="bool" default="true" />

View File

@ -978,6 +978,7 @@ move_on_add_mode_tooltip = <<<END
On "Add to selection" mode, we can move
the selection when the mouse is inside it.
END
select_tile_with_double_click = Select a grid tile with double-click
autotimeline = Show timeline automatically
autotimeline_tooltip = <<<END
Show the timeline automatically

View File

@ -176,6 +176,8 @@
<check text="@.move_edges" id="move_edges" tooltip="@.move_edges_tooltip" />
<check text="@.modifiers_disable_handles" id="modifiers_disable_handles" tooltip="@.modifiers_disable_handles_tooltip" />
<check text="@.move_on_add_mode" id="move_on_add_mode" tooltip="@.move_on_add_mode_tooltip" />
<check text="@.select_tile_with_double_click" id="select_tile_with_double_click"
pref="selection.doubleclick_select_tile" />
</vbox>
<!-- Timeline -->

View File

@ -378,7 +378,8 @@ bool StandbyState::onDoubleClick(Editor* editor, MouseMessage* msg)
tools::Ink* ink = editor->getCurrentEditorInk();
// Select a tile with double-click
if (ink->isSelection()) {
if (ink->isSelection() &&
Preferences::instance().selection.doubleclickSelectTile()) {
Command* selectTileCmd =
Commands::instance()->byId(CommandId::SelectTile());