From 0c6e8de9e535cedb005606394a0740f90ae40df8 Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 7 May 2019 10:33:05 -0300 Subject: [PATCH] Double-click opens the slice properties dialog w/Slice tool --- src/app/ui/editor/standby_state.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app/ui/editor/standby_state.cpp b/src/app/ui/editor/standby_state.cpp index a3261fe72..5ed9416b7 100644 --- a/src/app/ui/editor/standby_state.cpp +++ b/src/app/ui/editor/standby_state.cpp @@ -409,6 +409,17 @@ bool StandbyState::onDoubleClick(Editor* editor, MouseMessage* msg) UIContext::instance()->executeCommand(selectTileCmd, params); return true; } + // Show slice properties when we double-click it + else if (ink->isSlice()) { + EditorHit hit = editor->calcHit(msg->position()); + if (hit.slice()) { + Command* cmd = Commands::instance()->byId(CommandId::SliceProperties()); + Params params; + params.set("id", base::convert_to(hit.slice()->id()).c_str()); + UIContext::instance()->executeCommand(cmd, params); + return true; + } + } return false; }