# HG changeset patch # User John W. Eaton # Date 1560997942 18000 # Node ID 8779c631d55fcdcb01fe7976f62b49f106c8f6cd # Parent 0ad2ff3a3a6e6fd81b598fb74e95ade838a505ce fix access to top_level info flag when creating workspace view context menu * workspace-view.cc (workspace_view::contextmenu_requested): Use m_model to access top_level info flag. diff -r 0ad2ff3a3a6e -r 8779c631d55f libgui/src/workspace-view.cc --- a/libgui/src/workspace-view.cc Wed Jun 19 12:12:15 2019 -0500 +++ b/libgui/src/workspace-view.cc Wed Jun 19 21:32:22 2019 -0500 @@ -357,10 +357,9 @@ QAction *rename = menu.addAction (tr ("Rename"), this, SLOT (handle_contextmenu_rename ())); - QAbstractItemModel *m = m_view->model (); - const workspace_model *wm = static_cast (m); - - if (! wm->is_top_level ()) + // Use m_model here instead of using "m_view->model ()" because + // that points to the proxy model. + if (! m_model->is_top_level ()) { rename->setDisabled (true); rename->setToolTip (tr ("Only top-level symbols may be renamed"));