bugGNU Octave - Bugs: bug #55350, Figure toolbar disappears with...

 
 

bug #55350: Figure toolbar disappears with uicontrol or uipanel (qt toolkit)

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Mon 31 Dec 2018 06:54:07 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 01 Jan 2019 04:04:39 PM UTC, comment #5: 

Okay, I pushed the patch to stable.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Tue 01 Jan 2019 12:17:36 PM UTC, comment #4: 

Your patch fixes the issue for me.

The respective code was present since the initial push of the qt graphics toolkit. I also don't see why this logic was needed.

Markus Mützel <mmuetzel>
Group administrator
Mon 31 Dec 2018 11:48:31 PM UTC, comment #3: 

The code for this is in libgui/graphics/Figure.cc.  I don't understand the reason, but whenever there is a uicontrol object we explicitly stop drawing the toolbar.


// Toolbar and menubar
createFigureToolBarAndMenuBar ();
int toffset = 0;

if (fp.toolbar_is ("figure")
    || (fp.toolbar_is ("auto") && fp.menubar_is ("figure")
        && ! hasUiControlChildren (fp)))
  {
    toffset += m_figureToolBar->sizeHint ().height ();
    boffset += m_statusBar->sizeHint ().height ();
  }
else
  {
    m_figureToolBar->hide ();
    m_statusBar->hide ();
  }


Try the attached patch.  It works for the test case you provided.




(file #45820)

Rik <rik5>
Group administrator
Mon 31 Dec 2018 11:25:59 PM UTC, comment #2: 

Also, this is only an issue with the qt toolkit.

Rik <rik5>
Group administrator
Mon 31 Dec 2018 11:24:37 PM UTC, comment #1: 

Confirmed.  And it does the same thing in version 4.4.1 so this isn't even a regression.

Rik <rik5>
Group administrator
Mon 31 Dec 2018 06:54:07 PM UTC, original submission:  

When adding an "uicontrol" or "uipanel" object to a figure, the toolbar (below the menu bar) disappears. Setting the figure property "toolbar" to "figure" makes it re-appear:

hf = figure ();
input ("Press key and toolbar disappears");
uicontrol ();
input ("Press key and toolbar re-appears");
set (hf, "toolbar", "figure");


The toolbar should not be disappearing in this case. At least as long as "menubar" keeps being set to "figure".

Markus Mützel <mmuetzel>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #45820:  55350.cset added by rik5 (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-01 rik5 StatusPatch Reviewed Fixed
        Open/ClosedOpen Closed
    2019-01-01 mmuetzel StatusConfirmed Patch Reviewed
    2018-12-31 rik5 Attached File- Added 55350.cset, #45820
    2018-12-31 rik5 SummaryFigure toolbar disappears with uicontrol or uipanel Figure toolbar disappears with uicontrol or uipanel (qt toolkit)
    2018-12-31 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code