mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Fix drag slider from Maps tab
When viewing the maps tab it is possible to drag and drop the slider causing a file import dialog to pop-up and fail. This patch rejects any drop events where the url is http. Fixes #97.
This commit is contained in:
committed by
Sean Rhea
parent
51784f64f6
commit
06e44b8d47
@@ -466,7 +466,15 @@ MainWindow::selectView(int view)
|
||||
void
|
||||
MainWindow::dragEnterEvent(QDragEnterEvent *event)
|
||||
{
|
||||
event->acceptProposedAction(); // whatever you wanna drop we will try and process!
|
||||
bool accept = true;
|
||||
|
||||
// we reject http, since we want a file!
|
||||
foreach (QUrl url, event->mimeData()->urls())
|
||||
if (url.toString().startsWith("http"))
|
||||
accept = false;
|
||||
|
||||
if (accept) event->acceptProposedAction(); // whatever you wanna drop we will try and process!
|
||||
else event->ignore();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user