Commits

stealth977 committed 44859ce

- If an Object's NAME PROPERTY does not provide WRITE ACCESS, "Rename" menu option is disabled
fixes #885

  • Participants
  • Parent commits c71ea20

Comments (0)

Files changed (1)

qtOgitor/src/sceneview.cpp

             if(curSelection->getEditorType() == ETYPE_MULTISEL)
                 enableCopyToTemplate = true;
             else
-            {
                 enableCopyToTemplate = enableCopy;
-                enableRename = true;
-            }
+
+            enableRename = curSelection->getProperty("name")->getDefinition()->canWrite();
 
             CViewportEditor *vpe = OgitorsRoot::getSingletonPtr()->GetViewport();
             if(!curSelection->isTerrainType() && vpe->GetEditorTool() >= TOOL_DEFORM)
             if(multiSel->getAsSingle() == multiSel && !multiSel->isEmpty())
                 enableCopyToTemplate = true;
             else
-            {
                 enableCopyToTemplate = enableCopy;
-                enableRename = true;
-            }
+
+            enableRename = multiSel->getAsSingle()->getProperty("name")->getDefinition()->canWrite();
         }
         else if(multiSel)
             multiSel->setSelection(0);