octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53346] Command History window selects two lin


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #53346] Command History window selects two lines with mouse click
Date: Thu, 22 Mar 2018 03:32:07 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #2, bug #53346 (project octave):

I believe I've found the issue.  I'm attaching a patch.

I'm also attaching a couple screen shots to illustrate how this
two-line-select comes about.  There is a QListView and then there is a
model-selector object (I think, roughly speaking) and somehow those two have
to be in agreement.  That is, the list is displaying items with a particular
grid size, and the selector is selecting things within a particular rectangle
size.

I changed the grid size to h/2 as below:


    m_history_list_view->setGridSize (QSize (w,h/2));


and then got the result in screenshot
history_multiline_h_divide_by_2_Screenshot_from_2018-03-22_02-01-54.png 
Notice how the selector now appears to scan across 4 lines, so one click
selects four lines.

OK, other direction.  I changed th grid size to h + 10 as below:


    m_history_list_view->setGridSize (QSize (w,h+10));


which resulted in the screenshot
history_multiline_h_plus_10_Screenshot_from_2018-03-22_02-08-21.png  Notice
how the much more spaced lines result in only one line selected with a click.

The Qt documentation suggests that the default is typically fine rather than
trying to hand-roll the sizes.  I suppose the original programmer was
intending to fit more lines in the window via narrower spacing or something. 
If we want to do that, then we'll have to experiment with the grid size *and*
the selector size.

(file #43624, file #43625, file #43626)
    _______________________________________________________

Additional Item Attachment:

File name: octave-history_two_line_select-djs2018mar22.patch Size:1 KB
File name:
history_multiline_h_divide_by_2_Screenshot_from_2018-03-22_02-01-54.png
Size:46 KB
File name: history_multiline_h_plus_10_Screenshot_from_2018-03-22_02-08-21.png
Size:52 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53346>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]