Browse Source

Fixed an issue where project library was reimporting files on every project load

BearishSun 10 years ago
parent
commit
70fd7975f4
2 changed files with 12 additions and 4 deletions
  1. 11 0
      BansheeUtility/Source/BsPath.cpp
  2. 1 4
      TODO.txt

+ 11 - 0
BansheeUtility/Source/BsPath.cpp

@@ -267,6 +267,17 @@ namespace BansheeEngine
 			return *this;
 			return *this;
 
 
 		mDirectories.erase(mDirectories.begin(), mDirectories.begin() + base.mDirectories.size());
 		mDirectories.erase(mDirectories.begin(), mDirectories.begin() + base.mDirectories.size());
+
+		// Sometimes a directory name can be interpreted as a file and we're okay with that. Check for that
+		// special case.
+		if (base.isFile())
+		{
+			if (mDirectories.size() > 0)
+				mDirectories.erase(mDirectories.begin());
+			else
+				mFilename = L"";
+		}
+
 		mDevice = L"";
 		mDevice = L"";
 		mNode = L"";
 		mNode = L"";
 		mIsAbsolute = false;
 		mIsAbsolute = false;

+ 1 - 4
TODO.txt

@@ -62,9 +62,8 @@ Move data folder within current repo
  - See if recent project list is populated and interactable
  - See if recent project list is populated and interactable
  - Finally test if opening/creating a project while another one is open is possible
  - Finally test if opening/creating a project while another one is open is possible
 
 
-Test and fix project unload
-
 Ribek use:
 Ribek use:
+ - When mousing over GUIMenu elements cursor changes if underlying GUI element changes
  - Hook up color picker to guicolor field
  - Hook up color picker to guicolor field
  - When starting drag from hierarchy tree view it tends to select another object (can't repro)
  - When starting drag from hierarchy tree view it tends to select another object (can't repro)
  - UseCustomInspector isn't implemented
  - UseCustomInspector isn't implemented
@@ -85,11 +84,9 @@ First screenshot:
  - (Optionally) Console window
  - (Optionally) Console window
 
 
 Other polish:
 Other polish:
- - Crash on shutdown in mono_gchandle_free
  - C# inspectors for Point/Spot/Directional light
  - C# inspectors for Point/Spot/Directional light
  - C# interface for Font
  - C# interface for Font
  - Handle seems to lag behind the selected mesh
  - Handle seems to lag behind the selected mesh
- - ProjectLibrary seems to import some files on every start-up
  - Replace "minimize" button in tabbed title bar with maximize and make sure it works (in both docked and floating mode)
  - Replace "minimize" button in tabbed title bar with maximize and make sure it works (in both docked and floating mode)
  - When I expand inspector elements and them come back to that object it should remember the previous state
  - When I expand inspector elements and them come back to that object it should remember the previous state
    - Add a chaching mechanism to inspector (likely based on instance ID & property names)
    - Add a chaching mechanism to inspector (likely based on instance ID & property names)