<div dir="ltr">I am working on a patch as of now. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 27, 2019 at 9:39 PM Scott Kostyshak <<a href="mailto:skostysh@lyx.org">skostysh@lyx.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, Jun 29, 2019 at 05:33:04PM -0400, Jason Sun wrote:<br>
> Let me check again. I have been working on another larger extension these<br>
> days.<br>
> <br>
> On Sat, Jun 29, 2019 at 1:22 PM Stephan Witt <<a href="mailto:st.witt@gmx.net" target="_blank">st.witt@gmx.net</a>> wrote:<br>
> <br>
> > Am 25.06.2019 um 18:33 schrieb Richard Kimberly Heck <<a href="mailto:rikiheck@lyx.org" target="_blank">rikiheck@lyx.org</a>>:<br>
> > ><br>
> > > Can we get this tested on MacOS?<br>
> ><br>
> > I’ve tried to paste the snippet into the TocWidget.cpp …<br>
> > I had to change the TocWidget.h too, then it compiles.<br>
> ><br>
> > But I cannot see the improvement in behavior. I’m on master.<br>
> ><br>
> > Stephan<br>
> ><br>
> > ><br>
> > > On 6/19/19 4:52 PM, Jason Sun wrote:<br>
> > >> This problem is resolved by inserting the  following code to the<br>
> > TocWidget.cpp file<br>
> > >><br>
> > >> void TocWidget::keyPressEvent(QKeyEvent *event)<br>
> > >> {<br>
> > >>     if(event->key() == Qt::Key_Return)<br>
> > >>     {<br>
> > >>         QModelIndex const & curIdx = tocTV->currentIndex();<br>
> > >>         goTo(curIdx);<br>
> > >>         gui_view_.setFocus();<br>
> > >>         gui_view_.activateWindow();<br>
> > >>     }<br>
> > >> }<br>
> > >> Will be pushing a fix to the branch soon.<br>
> > >><br>
> > >> On Wed, Jun 19, 2019 at 3:21 PM Jason Sun <<a href="mailto:ds653@cornell.edu" target="_blank">ds653@cornell.edu</a>> wrote:<br>
> > >> I use MacOX High Sierra 10.13.6 and LyX 2.3.2.<br>
> > >><br>
> > >> The problem is the outline items(sections in the document) can only be<br>
> > selected by mouse click. However, the same LyX 2.3.2 on RollApp(cloud<br>
> > version of LyX) doesn’t not have this problem.<br>
> > >><br>
> > >> After looking at the source code, I thought of two solutions but none<br>
> > of them worked.<br>
> > >><br>
> > >> Solution 1. I added the following function to the TocWidget.cpp file to<br>
> > specifically handle the keyPressEvent:<br>
> > >><br>
> > >><br>
> > >><br>
> > ---------------------------------------------------------------------------------------------------------------<br>
> > >> void TocWidget::keyPressEvent(QKeyEvent *event)<br>
> > >> {<br>
> > >>      if(event->key() == Qt::Key_Enter)<br>
> > >>      {<br>
> > >>              QModelIndex const & curIdx = tocTV->currentIndex();<br>
> > >>              goTo(curIdx);<br>
> > >>              gui_view_.setFocus();<br>
> > >>              gui_view_.activateWindow();<br>
> > >>      }<br>
> > >> }<br>
> > >><br>
> > ---------------------------------------------------------------------------------------------------------------<br>
> > >><br>
> > >> But it doesn’t work after compiling against Qt5<br>
> > >><br>
> > >><br>
> > >><br>
> > >> Solution 2. I tried to hack the original function on_tocTV_pressed by<br>
> > adding a keyboardModifier flag check:<br>
> > >><br>
> > >> ___________________________________________________________________<br>
> > >> void TocWidget::on_tocTV_pressed(QModelIndex const & index)<br>
> > >> {<br>
> > >><br>
> > >>      Qt::MouseButtons const button = QApplication::mouseButtons();<br>
> > >>      Qt::KeyboardModifiers const modifier =<br>
> > QApplication::keyboardModifiers();<br>
> > >>      if ((button & Qt::LeftButton) ||<br>
> > modifier.testFlag(Qt::ShiftModifier)) {<br>
> > >>              goTo(index);<br>
> > >>              gui_view_.setFocus();<br>
> > >>              gui_view_.activateWindow();<br>
> > >>      }<br>
> > >> }<br>
> > >> ___________________________________________________________________<br>
> > >><br>
> > >> But still to no avail. I am not sure what is the problem here. I need<br>
> > some help/guidance in making this work on MacOS since this is the only<br>
> > place that requires mouse input. If this could be solved, I can 100% write<br>
> > my document mouse free which is a huge improvement considering the going<br>
> > back and forth in a large document using a mouse causes some inconvenience.<br>
> > >><br>
> > >> I also tried the same thing on 2.4 development build and the problem<br>
> > persists. I don’t even know how to debug the program. It would be very<br>
> > helpful if someone can tell me how to see(or print to status bar) all the<br>
> > variables or at least the QtIndices when navigating through the tocTV<br>
> > variable on GUI.<br>
> > >><br>
> > >><br>
> > >><br>
> > >> Jason Sun<br>
> > >> Ph.D Candidate<br>
> > >> Department of Statistical Science<br>
> > >> Cornell University<br>
> > >> 105 Malott Hall<br>
> > >> Ithaca, NY 14853-3201<br>
> > >><br>
> > >><br>
> > >><br>
> > >><br>
> > >> --<br>
> > >> Daqian Sun<br>
> > >> Tel:607-379-5149<br>
> > >> Department of Mathematics<br>
> > >> Department of Economics<br>
> > >> Cornell University<br>
> > >><br>
> > ><br>
> > ><br>
> ><br>
> ><br>
<br>
Is this issue still pending?<br>
<br>
Scott<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><i><b>Daqian Sun</b></i><div><i>Tel:607-379-5149<br></i><div><div><i>Department of Mathematics </i></div><div><i>Department of Economics</i></div></div><div><i>Cornell University</i></div><div><br></div></div></div></div>