Skip to content

Commit

Permalink
Add new imagepanel, but it doesn't display correctly. ros-visualizati…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffryho committed Apr 8, 2021
1 parent 5a9631d commit a3917ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/rviz/visualization_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1417,10 +1417,11 @@ VisualizationFrame::addPane(const QString& name, QWidget* panel, Qt::DockWidgetA
{
PanelDockWidget* dock;
dock = new PanelDockWidget(name);
addDockWidget(area, dock);

dock->setContentWidget(panel);
dock->setFloating(floating);
dock->setObjectName(name); // QMainWindow::saveState() needs objectName to be set.
addDockWidget(area, dock);

// we want to know when that panel becomes visible
connect(dock, SIGNAL(visibilityChanged(bool)), this, SLOT(onDockPanelVisibilityChange(bool)));
Expand Down
4 changes: 2 additions & 2 deletions src/rviz/visualization_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ class RVIZ_EXPORT VisualizationFrame : public QMainWindow, public WindowManagerI
PanelDockWidget* addPane(const QString& name,
QWidget* panel,
Qt::DockWidgetArea area = Qt::LeftDockWidgetArea,
bool floating = true) override;
bool floating = false) override;

QDockWidget* addPanelByName(const QString& name,
const QString& class_lookup_name,
Qt::DockWidgetArea area = Qt::LeftDockWidgetArea,
bool floating = true);
bool floating = false);

/** @brief Load the "general" config file, which has just the few
* things which should not be saved with a display config.
Expand Down
2 changes: 1 addition & 1 deletion src/rviz/window_manager_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class WindowManagerInterface
virtual PanelDockWidget* addPane(const QString& name,
QWidget* pane,
Qt::DockWidgetArea area = Qt::LeftDockWidgetArea,
bool floating = true) = 0;
bool floating = false) = 0;

/** Set the message displayed in the status bar */
virtual void setStatus(const QString& message) = 0;
Expand Down

0 comments on commit a3917ed

Please sign in to comment.