[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdevelop/3.4/parts/fileview
From: Andreas Pakulat <apaku () gmx ! de>
Date: 2007-03-01 0:13:35
Message-ID: 1172708015.819916.3555.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 638164 by apaku:
Fix active-dir-switching when the new dir is before the old dir in the itemlist
M +7 -3 fileitemfactory.cpp
M +1 -1 fileitemfactory.h
--- branches/kdevelop/3.4/parts/fileview/fileitemfactory.cpp #638163:638164
@@ -41,7 +41,7 @@
}
}
-bool FileTreeViewItem::changeActiveDir( const QString& olddir, const QString& newdir \
) +bool FileTreeViewItem::changeActiveDir( const QString& olddir, const QString& \
newdir, bool foundolddir, bool foundnewdir ) {
kdDebug( 9017 ) << "FileTreeViewItem::changeActiveDir(): " + olddir << " new: " \
<< newdir << " for: " << path() << endl;
@@ -49,6 +49,7 @@
{
m_isActiveDir = false;
setVisible( listView()->shouldBeShown( this ) );
+ foundolddir = true;
repaint();
}
@@ -56,14 +57,17 @@
{
m_isActiveDir = true;
setVisible( listView()->shouldBeShown( this ) );
+ foundnewdir = true;
repaint();
- return true;
}
+ if( foundnewdir && foundolddir )
+ return true;
+
FileTreeViewItem* item = static_cast<FileTreeViewItem*>( firstChild() );
while( item )
{
- if ( item->changeActiveDir( olddir, newdir ) )
+ if ( item->changeActiveDir( olddir, newdir, foundnewdir, foundolddir ) )
return true;
else
item = static_cast<FileTreeViewItem*>(item->nextSibling());
--- branches/kdevelop/3.4/parts/fileview/fileitemfactory.h #638163:638164
@@ -47,7 +47,7 @@
bool isProjectFile() const { return m_isProjectFile; }
bool setProjectFile( QString const &path, bool pf );
bool isActiveDir() const { return m_isActiveDir; }
- bool changeActiveDir( const QString &, const QString& );
+ bool changeActiveDir( const QString &, const QString&, bool foundolddir = \
false, bool foundnewdir = false );
protected:
virtual int compare( QListViewItem *i, int col, bool ascending ) const;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic