vymmodel.cpp
changeset 781 6cbf3c9cbd21
parent 780 fe839bdfd10c
child 784 9db215a4ad53
     1.1 --- a/vymmodel.cpp	Tue Jul 07 11:21:27 2009 +0000
     1.2 +++ b/vymmodel.cpp	Wed Jul 22 11:48:23 2009 +0000
     1.3 @@ -22,6 +22,8 @@
     1.4  
     1.5  extern bool debug;
     1.6  extern Main *mainWindow;
     1.7 +extern QDBusConnection dbusConnection;
     1.8 +
     1.9  extern Settings settings;
    1.10  extern QString tmpVymDir;
    1.11  
    1.12 @@ -148,6 +150,12 @@
    1.13  	// Create MapCenter
    1.14  	//  addMapCenter();  FIXME-2 VM create this in MapEditor until BO and MCO are independent of scene
    1.15  
    1.16 +	//Initialize DBUS
    1.17 +	//new CarAdaptor(car);
    1.18 +    //connection.registerObject("/Car", car);
    1.19 +    dbusConnection.registerService("org.insilmaril.vym");
    1.20 +
    1.21 +
    1.22  }
    1.23  
    1.24  void VymModel::makeTmpDirectories()
    1.25 @@ -2169,7 +2177,13 @@
    1.26  
    1.27  		emit (layoutChanged() );
    1.28  		reposition();	// both for moveUp/Down and relinking
    1.29 -		select (branch);
    1.30 +		if (dst->isScrolled() )
    1.31 +		{
    1.32 +			select (dst);	
    1.33 +			branch->updateVisibility();
    1.34 +		}
    1.35 +		else	
    1.36 +			select (branch);
    1.37  		return true;
    1.38  	}
    1.39  	return false;
    1.40 @@ -2316,6 +2330,7 @@
    1.41  		beginRemoveRows (ix,0,n);
    1.42  		removeRows (0,n+1,ix);
    1.43  		endRemoveRows();
    1.44 +		if (selbi->isScrolled()) selbi->unScroll();
    1.45  		emit (layoutChanged() );
    1.46  		reposition();
    1.47  	}