Commits

stealth977  committed f0be688

- Only folders in an OFS file can be used by "Make Scene Asset"
- Root folder can not be used as a resource folder, this is totally against the "Resource Folders" idea
- Single files can not be made assets, this is also against whole resource folders idea and not supported by OGRE
- Repeating again : There are certain design patterns for Engines, single resources at random locations is against this design pattern.
fixes #879
fixes #881

  • Participants
  • Parent commits fa9d4fd

Comments (0)

Files changed (1)

File qtOgitor/src/projectfilesview.cpp

 
     mActReadOnly = new QAction(tr("Read Only"), this);
     mActReadOnly->setStatusTip(tr("Set/UnSet File/Folder as Read Only"));
-    mActReadOnly->setIcon(QIcon(":/icons/lock.svg"));
     mActReadOnly->setCheckable(true);
     mActReadOnly->setChecked(false);
 
         {
             mActMakeAsset->setEnabled(false);
             mActMakeAsset->setChecked(false);
-            mActReadOnly->setChecked(false);
-            mActHidden->setChecked(false);
             mActReadOnly->setEnabled(false);
             mActHidden->setEnabled(false);
             mActDelete->setEnabled(false);
             {
                 mAddFileFolderPath = path.toStdString();
                 mActLinkFileSystem->setEnabled(!(flags & OFS::OFS_LINK));
+                mActMakeAsset->setEnabled(true);
+                mActMakeAsset->setChecked(false);
+
+                Ogre::StringVector dirs = Ogitors::OgitorsRoot::getSingletonPtr()->GetProjectOptions()->ResourceDirectories;
+                Ogre::StringVector::iterator it;
+
+                for(it = dirs.begin(); it != dirs.end(); it++)
+                {
+                    if((*it) == path.toStdString())
+                        mActMakeAsset->setChecked(true);
+                }
             }
             else
+            {
                 mActLinkFileSystem->setEnabled(false);
+                mActMakeAsset->setEnabled(true);
+                mActMakeAsset->setChecked(false);
+            }
 
-            mActMakeAsset->setEnabled(true);
-            mActMakeAsset->setChecked(false);
-            mActReadOnly->setChecked(true);
-            mActHidden->setChecked(true);
             mActReadOnly->setEnabled(!(flags & OFS::OFS_LINK));
             mActHidden->setEnabled(!(flags & OFS::OFS_LINK));
             mActDelete->setEnabled(!(flags & OFS::OFS_LINK));
         }
 
         mActReadOnly->setChecked(flags & OFS::OFS_READONLY);
-        if(flags & OFS::OFS_READONLY)
-            mActReadOnly->setIcon(QIcon(":icons/unlock.svg"));
         mActHidden->setChecked(flags & OFS::OFS_HIDDEN);
 
-        Ogre::StringVector dirs = Ogitors::OgitorsRoot::getSingletonPtr()->GetProjectOptions()->ResourceDirectories;
-        Ogre::StringVector::iterator it;
-
-        for(it = dirs.begin(); it != dirs.end(); it++)
-        {
-            if((*it) == path.toStdString())
-                mActMakeAsset->setChecked(true);
-        }
-
         mUnlinkFileSystem->clear();
 
         OFS::_Ofs::NameOfsPtrMap::iterator fit = fsLinks.begin();
     {
         mActMakeAsset->setEnabled(false);
         mActMakeAsset->setChecked(false);
+        mActReadOnly->setEnabled(false);
         mActReadOnly->setChecked(false);
+        mActHidden->setEnabled(false);
         mActHidden->setChecked(false);
-        mActReadOnly->setEnabled(false);
-        mActHidden->setEnabled(false);
         mActDelete->setEnabled(false);
         mActLinkFileSystem->setEnabled(false);
     }
 		mMenu->insertSeparator(mActAddFolder);
 	}
 
-
     QPoint globalPos = mOfsTreeWidget->mapToGlobal(pos);
     mMenu->exec(globalPos);