Bug 272510 - Adding a drag and drop capability
Summary: Adding a drag and drop capability
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 2.0.3
Platform: Microsoft Windows Microsoft Windows
: NOR wishlist
Target Milestone: 2.0.5
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-05 10:17 UTC by Grégoire Verlut
Modified: 2012-03-07 23:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grégoire Verlut 2011-05-05 10:17:41 UTC
Version:           2.0.3
OS:                MS Windows

It would be useful to add a drag & drop capability:

-from the file explorer, drag and drop a .kst file make it open (and ask before for saving the current session if needed)

-from the file explorer, drag and drop another type of file open the data wizard (and ask before if the current session shall be saved and closed or if this new data file shall be added to the current session)


Reproducible: Didn't try




OS: Windows 32-Bit
Comment 1 Nicolas Brisset 2012-02-08 20:48:51 UTC
This shouldn't be too hard to implement. Tentatively set the target to 2.0.5
Comment 2 Nicolas Brisset 2012-03-07 23:48:05 UTC
SVN commit 1284152 by brisset:

Add drag&drop feature:
- if dropping a .kst file, open it after checking what needed to be saved has been saved
- if dropping something else, open it in the datawizard

The prompt to save feature in case of change has been refactored along the way to make it more readable code-wise. I hope I haven't broken anything.
The reason why our previous attempt had not been conclusive is that we have to setAcceptDrops(false) all the way down the parent chain: _tabWidget *and* View.

Note: my tests exposed a bug: adding view items is not registered as a change. This should be fixed!



 M  +45 -19    mainwindow.cpp  
 M  +4 -1      mainwindow.h  
 M  +2 -0      scene.cpp  
 M  +2 -0      view.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1284152