Material: rename Materials_Edit command
For consistency it should be Material_Edit.
This commit is contained in:
@@ -141,7 +141,7 @@ endif(FREECAD_USE_PCH)
|
||||
|
||||
SET(MatGuiIcon_SVG
|
||||
Resources/icons/list.svg
|
||||
Resources/icons/Materials_Edit.svg
|
||||
Resources/icons/Material_Edit.svg
|
||||
Resources/icons/MaterialWorkbench.svg
|
||||
Resources/icons/multiline.svg
|
||||
Resources/icons/preferences-material.svg
|
||||
|
||||
@@ -41,27 +41,27 @@
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
//===========================================================================
|
||||
// Materials_Edit
|
||||
// Material_Edit
|
||||
//===========================================================================
|
||||
DEF_STD_CMD_A(CmdMaterialsEdit)
|
||||
DEF_STD_CMD_A(CmdMaterialEdit)
|
||||
|
||||
CmdMaterialsEdit::CmdMaterialsEdit()
|
||||
: Command("Materials_Edit")
|
||||
CmdMaterialEdit::CmdMaterialEdit()
|
||||
: Command("Material_Edit")
|
||||
{
|
||||
sAppModule = "Material";
|
||||
sGroup = QT_TR_NOOP("Material");
|
||||
sMenuText = QT_TR_NOOP("Edit...");
|
||||
sToolTipText = QT_TR_NOOP("Edit material properties");
|
||||
sWhatsThis = "Materials_Edit";
|
||||
sWhatsThis = "Material_Edit";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Materials_Edit";
|
||||
sPixmap = "Material_Edit";
|
||||
}
|
||||
|
||||
void CmdMaterialsEdit::activated(int iMsg)
|
||||
void CmdMaterialEdit::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
Base::Console().Log("Materials_Edit\n");
|
||||
Base::Console().Log("Material_Edit\n");
|
||||
|
||||
static QPointer<QDialog> dlg = nullptr;
|
||||
if (!dlg) {
|
||||
@@ -71,7 +71,7 @@ void CmdMaterialsEdit::activated(int iMsg)
|
||||
dlg->show();
|
||||
}
|
||||
|
||||
bool CmdMaterialsEdit::isActive()
|
||||
bool CmdMaterialEdit::isActive()
|
||||
{
|
||||
// return (hasActiveDocument() && !Gui::Control().activeDialog());
|
||||
return true;
|
||||
@@ -119,7 +119,7 @@ StdCmdSetMaterial::StdCmdSetMaterial()
|
||||
sToolTipText = QT_TR_NOOP("Sets the material of the selected object");
|
||||
sWhatsThis = "Std_SetMaterial";
|
||||
sStatusTip = QT_TR_NOOP("Sets the material of the selected object");
|
||||
sPixmap = "Materials_Edit";
|
||||
sPixmap = "Material_Edit";
|
||||
// sAccel = "Ctrl+D";
|
||||
// eType = Alter3DView;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ CmdInspectAppearance::CmdInspectAppearance()
|
||||
sToolTipText = QT_TR_NOOP("Inspect the appearance properties of the selected object");
|
||||
sWhatsThis = "Materials_InspectAppearance";
|
||||
sStatusTip = QT_TR_NOOP("Inspect the appearance properties of the selected object");
|
||||
// sPixmap = "Materials_Edit";
|
||||
// sPixmap = "Material_Edit";
|
||||
}
|
||||
|
||||
void CmdInspectAppearance::activated(int iMsg)
|
||||
@@ -175,7 +175,7 @@ CmdInspectMaterial::CmdInspectMaterial()
|
||||
sToolTipText = QT_TR_NOOP("Inspect the material properties of the selected object");
|
||||
sWhatsThis = "Materials_InspectMaterial";
|
||||
sStatusTip = QT_TR_NOOP("Inspect the material properties of the selected object");
|
||||
// sPixmap = "Materials_Edit";
|
||||
// sPixmap = "Material_Edit";
|
||||
}
|
||||
|
||||
void CmdInspectMaterial::activated(int iMsg)
|
||||
@@ -195,7 +195,7 @@ void CreateMaterialCommands()
|
||||
{
|
||||
Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||
|
||||
rcCmdMgr.addCommand(new CmdMaterialsEdit());
|
||||
rcCmdMgr.addCommand(new CmdMaterialEdit());
|
||||
rcCmdMgr.addCommand(new StdCmdSetAppearance());
|
||||
rcCmdMgr.addCommand(new StdCmdSetMaterial());
|
||||
rcCmdMgr.addCommand(new CmdInspectAppearance());
|
||||
|
||||
@@ -255,7 +255,7 @@ void MaterialTreeWidget::editorClicked(bool checked)
|
||||
setMaterial(material->getUUID());
|
||||
}
|
||||
|
||||
// Gui::Application::Instance->commandManager().runCommandByName("Materials_Edit");
|
||||
// Gui::Application::Instance->commandManager().runCommandByName("Material_Edit");
|
||||
// Toggle the open state
|
||||
// setExpanded(!m_expanded);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<qresource>
|
||||
<file>icons/list.svg</file>
|
||||
<file>icons/MaterialWorkbench.svg</file>
|
||||
<file>icons/Materials_Edit.svg</file>
|
||||
<file>icons/Material_Edit.svg</file>
|
||||
<file>icons/multiline.svg</file>
|
||||
<file>icons/preferences-material.svg</file>
|
||||
<file>icons/preview-rendered.svg</file>
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -49,8 +49,8 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
|
||||
Gui::MenuItem* material = new Gui::MenuItem;
|
||||
root->insertItem(item, material);
|
||||
material->setCommand("&Materials");
|
||||
*material << "Materials_Edit";
|
||||
material->setCommand("&Material");
|
||||
*material << "Material_Edit";
|
||||
|
||||
return root;
|
||||
}
|
||||
@@ -60,8 +60,8 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
|
||||
|
||||
Gui::ToolBarItem* material = new Gui::ToolBarItem(root);
|
||||
material->setCommand("Materials");
|
||||
*material << "Materials_Edit";
|
||||
material->setCommand("Material");
|
||||
*material << "Material_Edit";
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
@@ -950,7 +950,7 @@ def openEditor(obj=None, prop=None):
|
||||
# editor = MaterialEditor(obj, prop)
|
||||
# editor.exec_()
|
||||
# else:
|
||||
FreeCADGui.runCommand('Materials_Edit',0)
|
||||
FreeCADGui.runCommand('Material_Edit',0)
|
||||
|
||||
|
||||
def editMaterial(material=None, card_path=None, category="Solid"):
|
||||
|
||||
Reference in New Issue
Block a user