Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
56d6bc66
Commit
56d6bc66
authored
May 07, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for stock tool dockwidget locations not being saved properly after fix for custom dockwidgets
parent
dc46e15d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
MainWindow.cc
src/ui/MainWindow.cc
+10
-10
No files found.
src/ui/MainWindow.cc
View file @
56d6bc66
...
...
@@ -630,10 +630,10 @@ void MainWindow::addTool(SubMainWindow *parent,VIEW_SECTIONS view,QDockWidget* w
void
MainWindow
::
createDockWidget
(
QWidget
*
parent
,
QWidget
*
child
,
QString
title
,
QString
objectname
,
VIEW_SECTIONS
view
,
Qt
::
DockWidgetArea
area
,
int
minwidth
,
int
minheight
)
{
if
(
child
->
objectName
()
==
""
)
{
//
if (child->objectName() == "")
//
{
child
->
setObjectName
(
objectname
);
}
//
}
QDockWidget
*
widget
=
new
QDockWidget
(
title
,
this
);
if
(
!
isAdvancedMode
)
{
...
...
@@ -659,7 +659,7 @@ void MainWindow::createDockWidget(QWidget *parent,QWidget *child,QString title,Q
label
->
installEventFilter
(
new
DockWidgetTitleBarEventFilter
());
label
->
hide
();
}
widget
->
setObjectName
(
child
->
objectName
()
+
"DOCK"
);
widget
->
setObjectName
(
child
->
objectName
());
widget
->
setWidget
(
child
);
if
(
minheight
!=
0
||
minwidth
!=
0
)
{
...
...
@@ -865,7 +865,7 @@ void MainWindow::createCustomWidget()
ui
.
menuTools
->
addSeparator
();
}
QGCToolWidget
*
tool
=
new
QGCToolWidget
(
"Unnamed Tool "
+
QString
::
number
(
ui
.
menuTools
->
actions
().
size
()));
createDockWidget
(
centerStack
->
currentWidget
(),
tool
,
"Unnamed Tool "
+
QString
::
number
(
ui
.
menuTools
->
actions
().
size
()),
"UNNAMED_TOOL_"
+
QString
::
number
(
ui
.
menuTools
->
actions
().
size
()),
currentView
,
Qt
::
BottomDockWidgetArea
);
createDockWidget
(
centerStack
->
currentWidget
(),
tool
,
"Unnamed Tool "
+
QString
::
number
(
ui
.
menuTools
->
actions
().
size
()),
"UNNAMED_TOOL_"
+
QString
::
number
(
ui
.
menuTools
->
actions
().
size
())
+
"DOCK"
,
currentView
,
Qt
::
BottomDockWidgetArea
);
//tool->setObjectName("UNNAMED_TOOL_" + QString::number(ui.menuTools->actions().size()));
QSettings
settings
;
settings
.
beginGroup
(
"QGC_MAINWINDOW"
);
...
...
@@ -908,19 +908,19 @@ void MainWindow::loadCustomWidget(const QString& fileName, bool singleinstance)
switch
(
view
)
{
case
VIEW_ENGINEER
:
createDockWidget
(
dataView
,
tool
,
tool
->
getTitle
(),
tool
->
objectName
(),(
VIEW_SECTIONS
)
view
,
Qt
::
LeftDockWidgetArea
);
createDockWidget
(
dataView
,
tool
,
tool
->
getTitle
(),
tool
->
objectName
()
+
"DOCK"
,(
VIEW_SECTIONS
)
view
,
Qt
::
LeftDockWidgetArea
);
break
;
case
VIEW_FLIGHT
:
createDockWidget
(
pilotView
,
tool
,
tool
->
getTitle
(),
tool
->
objectName
(),(
VIEW_SECTIONS
)
view
,
Qt
::
LeftDockWidgetArea
);
createDockWidget
(
pilotView
,
tool
,
tool
->
getTitle
(),
tool
->
objectName
()
+
"DOCK"
,(
VIEW_SECTIONS
)
view
,
Qt
::
LeftDockWidgetArea
);
break
;
case
VIEW_SIMULATION
:
createDockWidget
(
simView
,
tool
,
tool
->
getTitle
(),
tool
->
objectName
(),(
VIEW_SECTIONS
)
view
,
Qt
::
LeftDockWidgetArea
);
createDockWidget
(
simView
,
tool
,
tool
->
getTitle
(),
tool
->
objectName
()
+
"DOCK"
,(
VIEW_SECTIONS
)
view
,
Qt
::
LeftDockWidgetArea
);
break
;
case
VIEW_MISSION
:
createDockWidget
(
plannerView
,
tool
,
tool
->
getTitle
(),
tool
->
objectName
(),(
VIEW_SECTIONS
)
view
,
Qt
::
LeftDockWidgetArea
);
createDockWidget
(
plannerView
,
tool
,
tool
->
getTitle
(),
tool
->
objectName
()
+
"DOCK"
,(
VIEW_SECTIONS
)
view
,
Qt
::
LeftDockWidgetArea
);
break
;
default:
createDockWidget
(
centerStack
->
currentWidget
(),
tool
,
tool
->
getTitle
(),
tool
->
objectName
(),(
VIEW_SECTIONS
)
view
,
Qt
::
LeftDockWidgetArea
);
createDockWidget
(
centerStack
->
currentWidget
(),
tool
,
tool
->
getTitle
(),
tool
->
objectName
()
+
"DOCK"
,(
VIEW_SECTIONS
)
view
,
Qt
::
LeftDockWidgetArea
);
break
;
}
...
...
Write
Preview
Markdown
is supported
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