Skip to content

Commit feb611e

Browse files
committed
Fixup: Call DockWidgets::setFloating() after addDockWidget
1 parent 757b445 commit feb611e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/python_bindings/sip/visualization_frame.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public:
3535
virtual rviz::PanelDockWidget* addPane( const QString& name,
3636
QWidget* panel,
3737
Qt::DockWidgetArea area = Qt::LeftDockWidgetArea,
38-
bool floating = true );
38+
bool floating = false );
3939

4040
/** @brief Load the "general" config file, which has just the few
4141
* things which should not be saved with a display config.
@@ -60,7 +60,7 @@ public:
6060
QString getErrorMessage() const;
6161

6262
/** @brief Load the properties of all subsystems from the given Config.
63-
*
63+
*
6464
* This is called by loadDisplayConfig().
6565
*
6666
* @param config Must have type Config::Map.

src/rviz/visualization_frame.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,12 +1417,10 @@ VisualizationFrame::addPane(const QString& name, QWidget* panel, Qt::DockWidgetA
14171417
{
14181418
PanelDockWidget* dock;
14191419
dock = new PanelDockWidget(name);
1420-
if (floating) // "floating" mutually excludes "docked"
1421-
dock->setFloating(floating);
1422-
else
1423-
addDockWidget(area, dock);
1420+
addDockWidget(area, dock);
14241421

14251422
dock->setContentWidget(panel);
1423+
dock->setFloating(floating);
14261424
dock->setObjectName(name); // QMainWindow::saveState() needs objectName to be set.
14271425

14281426
// we want to know when that panel becomes visible

0 commit comments

Comments
 (0)