[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kio/kfile
From: Clarence Dang <dang () kde ! org>
Date: 2003-02-15 20:40:21
[Download RAW message or body]
CVS commit by dang:
Fix the bug where the url was interpreted twice in single-file-selection mode (e.g. \
Saving). Now ".." works again.
M +8 -1 kfiledialog.cpp 1.337
--- kdelibs/kio/kfile/kfiledialog.cpp #1.336:1.337
@@ -397,4 +397,5 @@ void KFileDialog::slotOk()
selectedURL = ops->url();
selectedURL.addPath( text ); // works for filenames and relative \
paths + selectedURL.cleanPath (); // fix "dir/../"
}
} else // complete URL
@@ -1159,4 +1160,10 @@ void KFileDialog::urlEntered(const KURL&
void KFileDialog::locationActivated( const QString& url )
{
+ // This guard prevents any URL _typed_ by the user from being interpreted
+ // twice (by returnPressed/slotOk and here, activated/locationActivated)
+ // after the user presses Enter. Without this, _both_ setSelection and
+ // slotOk would "u.addPath( url )" ...so instead we leave it up to just
+ // slotOk....
+ if (!locationEdit->lineEdit()->edited())
setSelection( url );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic