When a Show command is executed the specified item is selected and all other selected items are deselected. Is there any way to prevent this behaviour? Test button attached. Select a few files and execute to see what happens.
function OnClick(clickData)
{
// --------------------------------------------------------
var cmd = clickData.func.command;
cmd.deselect = false; // Prevent automatic deselection
// --------------------------------------------------------
var n = clickData.func.sourcetab.selected_files.count;
if (clickData.func.sourcetab.selected_files.count>0){
var f = String(clickData.func.sourcetab.selected_files(0));
cmd.RunCommand('Show "'+f+'"');
}
// --------------------------------------------------------
}
ShowTest.dcf (1.1 KB)