Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
ed6110f2
Commit
ed6110f2
authored
Oct 17, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix docked widgets losing title and decoration when undocked
parent
e45fe2f5
Pipeline
#9081
passed with stage
in 25 minutes and 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
ed6110f2
...
...
@@ -240,7 +240,6 @@ void MainWindow::init()
setupActions
();
QDockWidget
*
libraryDock
=
addDock
(
i18n
(
"Library"
),
QStringLiteral
(
"library"
),
pCore
->
library
());
QDockWidget
*
mixerDock
=
addDock
(
i18n
(
"Audio Mixer"
),
QStringLiteral
(
"mixer"
),
pCore
->
mixer
());
m_clipMonitor
=
new
Monitor
(
Kdenlive
::
ClipMonitor
,
pCore
->
monitorManager
(),
this
);
...
...
@@ -278,7 +277,7 @@ void MainWindow::init()
m_timelineTabs
=
new
TimelineTabs
(
this
);
ctnLay
->
addWidget
(
m_timelineTabs
);
// Screen grab widget
QWidget
*
grabWidget
=
new
QWidget
(
this
);
QVBoxLayout
*
grabLayout
=
new
QVBoxLayout
;
...
...
@@ -3397,17 +3396,20 @@ QDockWidget *MainWindow::addDock(const QString &title, const QString &objectName
dockWidget
->
setObjectName
(
objectName
);
dockWidget
->
setWidget
(
widget
);
addDockWidget
(
area
,
dockWidget
);
connect
(
dockWidget
,
&
QDockWidget
::
dockLocationChanged
,
this
,
[
this
](
Qt
::
DockWidgetArea
dockLocationArea
)
{
if
(
dockLocationArea
==
Qt
::
NoDockWidgetArea
)
{
updateDockTitleBars
(
false
);
}
else
{
updateDockTitleBars
(
true
);
}
});
connect
(
dockWidget
,
&
QDockWidget
::
dockLocationChanged
,
this
,
&
MainWindow
::
slotUpdateDockLocation
);
connect
(
dockWidget
,
&
QDockWidget
::
topLevelChanged
,
this
,
&
MainWindow
::
updateDockTitleBars
);
return
dockWidget
;
}
void
MainWindow
::
slotUpdateDockLocation
(
Qt
::
DockWidgetArea
dockLocationArea
)
{
if
(
dockLocationArea
==
Qt
::
NoDockWidgetArea
)
{
updateDockTitleBars
(
false
);
}
else
{
updateDockTitleBars
(
true
);
}
}
void
MainWindow
::
slotUpdateMonitorOverlays
(
int
id
,
int
code
)
{
QMenu
*
monitorOverlay
=
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"monitor_config_overlay"
),
this
));
...
...
@@ -3462,11 +3464,13 @@ void MainWindow::updateDockTitleBars(bool isTopLevel)
if
(
!
KdenliveSettings
::
showtitlebars
()
||
!
isTopLevel
)
{
return
;
}
QList
<
QDockWidget
*>
docks
=
pCore
->
window
()
->
findChildren
<
QDockWidget
*>
();
QList
<
QDockWidget
*>
docks
=
findChildren
<
QDockWidget
*>
();
//qDebug()<<"=== FOUND DOCKS: "<<docks.count();
for
(
int
i
=
0
;
i
<
docks
.
count
();
++
i
)
{
QDockWidget
*
dock
=
docks
.
at
(
i
);
QWidget
*
bar
=
dock
->
titleBarWidget
();
if
(
dock
->
isFloating
())
{
//qDebug()<<"==== FOUND FLOATING: "<<dock->objectName();
if
(
bar
)
{
dock
->
setTitleBarWidget
(
nullptr
);
delete
bar
;
...
...
src/mainwindow.h
View file @
ed6110f2
...
...
@@ -283,6 +283,8 @@ private slots:
/** @brief Shows the shortcut dialog. */
void
slotEditKeys
();
void
loadDockActions
();
/** @brief Add/remove Dock tile bar depending on state (tabbed, floating, ...) */
void
slotUpdateDockLocation
(
Qt
::
DockWidgetArea
dockLocationArea
);
/** @brief Reflects setting changes to the GUI. */
void
updateConfiguration
();
void
slotConnectMonitors
();
...
...
Jean-Baptiste Mardelle
@mardelle
mentioned in issue
#368 (closed)
·
Oct 19, 2019
mentioned in issue
#368 (closed)
mentioned in issue #368
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment