Browse Source

Progress bar shouldn't appear for just one frame

Marko Pintera 10 years ago
parent
commit
c3ae94dc8a
3 changed files with 18 additions and 16 deletions
  1. 1 1
      BansheeGLRenderSystem/Source/BsWin32GLSupport.cpp
  2. 17 12
      MBansheeEditor/ProjectLibrary.cs
  3. 0 3
      TODO.txt

+ 1 - 1
BansheeGLRenderSystem/Source/BsWin32GLSupport.cpp

@@ -87,7 +87,7 @@ namespace BansheeEngine
 	{
 	{
 		GLRenderAPI* rs = static_cast<GLRenderAPI*>(RenderAPICore::instancePtr());
 		GLRenderAPI* rs = static_cast<GLRenderAPI*>(RenderAPICore::instancePtr());
 
 
-		// If RenderSystem has initialized a context use that, otherwise we create our own
+		// If RenderAPI has initialized a context use that, otherwise we create our own
 		HGLRC glrc = externalGlrc;
 		HGLRC glrc = externalGlrc;
 		bool createdNew = false;
 		bool createdNew = false;
 		if (!rs->_isContextInitialized())
 		if (!rs->_isContextInitialized())

+ 17 - 12
MBansheeEditor/ProjectLibrary.cs

@@ -117,20 +117,11 @@ namespace BansheeEditor
             {
             {
                 UInt64 start = Time.Precise;
                 UInt64 start = Time.Precise;
                 List<string> toRemove = new List<string>();
                 List<string> toRemove = new List<string>();
+                string lastEntry = "";
+
                 foreach (var entry in queuedForImport)
                 foreach (var entry in queuedForImport)
                 {
                 {
-                    float pct = numImportedFiles/(float)totalFilesToImport;
-
-                    string displayName = entry;
-                    displayName = displayName.Replace("\\", "\\\\");
-
-                    if (displayName.Length > 60)
-                    {
-                        displayName = displayName.Remove(0, displayName.Length - 60);
-                        displayName = "..." + displayName;
-                    }
-
-                    ProgressBar.Show("Importing (" + numImportedFiles + "/" + totalFilesToImport + ")", displayName, pct);
+                    lastEntry = entry;
 
 
                     Internal_Refresh(entry, true);
                     Internal_Refresh(entry, true);
                     toRemove.Add(entry);
                     toRemove.Add(entry);
@@ -154,6 +145,20 @@ namespace BansheeEditor
 
 
                     ProgressBar.Hide();
                     ProgressBar.Hide();
                 }
                 }
+                else
+                {
+                    string displayName = lastEntry;
+                    displayName = displayName.Replace("\\", "\\\\");
+
+                    if (displayName.Length > 60)
+                    {
+                        displayName = displayName.Remove(0, displayName.Length - 60);
+                        displayName = "..." + displayName;
+                    }
+
+                    float pct = numImportedFiles / (float)totalFilesToImport;
+                    ProgressBar.Show("Importing (" + numImportedFiles + "/" + totalFilesToImport + ")", displayName, pct);
+                }
             }
             }
         }
         }
 
 

+ 0 - 3
TODO.txt

@@ -24,9 +24,6 @@ When windows first open they show up as all black. This is problematic with prog
 I'm not sure if queued dependencies are handled properly. They're handled on an internal ProjectLibrary loop but perhaps I should
 I'm not sure if queued dependencies are handled properly. They're handled on an internal ProjectLibrary loop but perhaps I should
 return them in checkForModifications?
 return them in checkForModifications?
 
 
-Window titlebars and focus borders no longer render!?
- - Might be after my change to fix zero width/height elements in layouts
-
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 Project window
 Project window