[baobab] Set the model after the scan is started



commit 2f4fece93d55320a744f2603f16bf486948079fb
Author: Paolo Borelli <pborelli gnome org>
Date:   Mon Aug 13 21:45:00 2012 +0200

    Set the model after the scan is started
    
    When using "reload", starting the scan also clears the model, so we need to do that
    before changing the model, so that the view resets its state properly.

 src/baobab-window.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index e87bb2a..f976001 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -543,8 +543,6 @@ namespace Baobab {
         void scan_active_location (bool force) {
             var scanner = active_location.scanner;
 
-            set_model (active_location.scanner);
-
             scan_completed_handler = scanner.completed.connect(() => {
                 try {
                     scanner.finish();
@@ -567,6 +565,8 @@ namespace Baobab {
             set_ui_state (UIPage.RESULT, true);
 
             scanner.scan (force);
+
+            set_model (active_location.scanner);
         }
 
         public void scan_directory (File directory) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]