Преглед на файлове

Progress bar shouldn't appear for just one frame

Marko Pintera преди 10 години
родител
ревизия
c3ae94dc8a
променени са 3 файла, в които са добавени 18 реда и са изтрити 16 реда
  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());
 
-		// 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;
 		bool createdNew = false;
 		if (!rs->_isContextInitialized())

+ 17 - 12
MBansheeEditor/ProjectLibrary.cs

@@ -117,20 +117,11 @@ namespace BansheeEditor
             {
                 UInt64 start = Time.Precise;
                 List<string> toRemove = new List<string>();
+                string lastEntry = "";
+
                 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);
                     toRemove.Add(entry);
@@ -154,6 +145,20 @@ namespace BansheeEditor
 
                     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
 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