SnapSelectionCenterInit.js 758 B

123456789101112131415161718
  1. function init(basePath) {
  2. var action = new RGuiAction(qsTranslate("SnapSelectionCenter", "Center of &Selection"), RMainWindowQt.getMainWindow());
  3. action.setRequiresDocument(true);
  4. action.setScriptFile(basePath + "/SnapSelectionCenter.js");
  5. action.setIcon(basePath + "/SnapSelectionCenter.svg");
  6. action.setDefaultShortcut(new QKeySequence("s,k"));
  7. action.setDefaultCommands(["snapselectioncenter", "sk"]);
  8. //action.setGroup("snaps");
  9. action.setNoState(true);
  10. action.setOverride();
  11. action.setGroupSortOrder(15560);
  12. action.setSortOrder(100);
  13. action.setWidgetNames(["SnapMenu", "SnapToolBar", "SnapToolsPanel", "SnapMatrixPanel"]);
  14. var appWin = EAction.getMainWindow();
  15. appWin.addFocusListener(action);
  16. }