-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Associated widget which is docked creating a tabbed panels gets disabled if tab is not visible #1738
Comments
connect(getAssociatedWidgetPanel(), SIGNAL( visibilityChanged( bool ) ), this, SLOT( onAssociatedPanelVisibilityChange( bool ) )); void WorkbenchDisplay::onAssociatedPanelVisibilityChange(bool /*visible*/)
{
setEnabled(true);
} |
Well actually that does not work because now the display cannot be disabled. |
Finally was able to create a work around. I first had to disconnect the following signal. disconnect(getAssociatedWidgetPanel(), SIGNAL( visibilityChanged(bool) ), this, SLOT( associatedPanelVisibilityChange(bool) )); Then override the void WorkbenchDisplay::onEnableChanged()
{
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
queueRender();
/* We get here, by two different routes:
* - First, we might have disabled the display.
* In this case we want to close/hide the associated widget.
* But there is an exception: tabbed DockWidgets shouldn't be hidden, because then we would loose the
* tab.
* - Second, the corresponding widget changed visibility and we got here via
* associatedPanelVisibilityChange().
* In this case, it's usually counterproductive to show/hide the widget here.
* Typical cases are: main window was minimized/unminimized, tab was switched.
*/
if (isEnabled())
{
scene_node_->setVisible(true);
if (getAssociatedWidgetPanel() != nullptr)
{
getAssociatedWidgetPanel()->show();
getAssociatedWidgetPanel()->setEnabled(true);
}
else if (getAssociatedWidget() != nullptr)
{
getAssociatedWidget()->show();
getAssociatedWidgetPanel()->setEnabled(true);
}
if (isEnabled()) // status might have changed, e.g. if show() failed
onEnable();
}
else
{
onDisable();
if (getAssociatedWidgetPanel() != nullptr)
getAssociatedWidgetPanel()->setDisabled(true);
else if (getAssociatedWidget())
getAssociatedWidget()->setDisabled(true);
scene_node_->setVisible(false);
}
QApplication::restoreOverrideCursor();
} This just disables the widget opposed to hiding and showing. |
There is a simpler solution: #1739. |
Thanks for the fix. |
@Levi-Armstrong, you seem to have implemented a fancy visual interface to Tesseract integrated into rviz. Is that already available somewhere? I couldn't find it. Can you provide a pointer? |
Sure, it is under a lot of development at the moment. tesseract_gui |
Currently if I dock my panel on top of another panel creating tabbed panels and then you switched tab it disables the display. Is there a way to disable this functionality?
The text was updated successfully, but these errors were encountered: