[Kst] Double click to open plot dialog: no luck :-(
nicolas.brisset at free.fr
Wed Jun 29 23:27:59 CEST 2011
as mentioned by Barth in the log of commit #1234248 the current behavior to open the plot dialog when clicking on the axes is single click. I think double-click would be more consistent with other similar actions (like opening the edit curve dialog when double-clicking on a curve) and I thought I'd manage to change that on my own. I have failed :-(
I believe the core of the action happens in the PlotItem::mousePressEvent method, but when I try to filter the events by introducing something like
if (view()->viewMode() == View::Data && event->button() == Qt::LeftButton && event->type() == QEvent::GraphicsSceneMouseDoubleClick)
then nothing more happens. I have also tried QEvent::MouseButtonDblClick without success. What am I doing wrong?
P.S. : I have also looked at implementing drag&drop to open files (either .kst or data files) and I think it is not too difficult. But maybe it only seems to be easy... though I guess for you gurus it really is!
More information about the Kst