Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
c2a4d7e3
Commit
c2a4d7e3
authored
Nov 07, 2013
by
Rashad Kanavath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing BUG:
#815
parent
00b9412a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
9 deletions
+23
-9
Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageListParameter.cxx
...rs/QtWidget/otbWrapperQtWidgetInputImageListParameter.cxx
+23
-9
No files found.
Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageListParameter.cxx
View file @
c2a4d7e3
...
...
@@ -38,19 +38,23 @@ void QtWidgetInputImageListParameter::DoUpdateGUI()
if
(
!
m_InputImageListParam
)
return
;
std
::
vector
<
std
::
string
>
fileList
=
m_InputImageListParam
->
GetFileNameList
();
for
(
unsigned
int
i
=
m_FileSelectionList
.
size
();
i
<
fileList
.
size
();
i
++
)
//update fileSelectionList only if HasUserValue flag is set(from xml)
if
(
m_InputImageListParam
->
HasUserValue
()
)
{
std
::
vector
<
std
::
string
>
fileList
=
m_InputImageListParam
->
GetFileNameList
();
for
(
unsigned
int
i
=
m_FileSelectionList
.
size
();
i
<
fileList
.
size
();
i
++
)
{
this
->
AddFile
();
}
int
i
=
0
;
std
::
vector
<
std
::
string
>::
iterator
it
;
for
(
it
=
fileList
.
begin
();
it
!=
fileList
.
end
();
++
it
)
{
}
unsigned
int
i
=
0
;
std
::
vector
<
std
::
string
>::
iterator
it
;
for
(
it
=
fileList
.
begin
();
it
!=
fileList
.
end
();
++
it
)
{
m_FileSelectionList
[
i
++
]
->
GetInput
()
->
setText
(
QString
::
fromStdString
(
(
*
it
)
)
);
}
}
}
void
QtWidgetInputImageListParameter
::
DoCreateWidget
()
{
m_FileSelectionList
.
clear
();
...
...
@@ -150,6 +154,15 @@ void QtWidgetInputImageListParameter::DoCreateWidget()
void
QtWidgetInputImageListParameter
::
UpdateImageList
()
{
/* Adding a NullElement so to make the m_FileSelectionList and
* m_InputImageList's ImageList are of same size. So that GetImageList().Size()
* seems to be happy.
*/
for
(
unsigned
int
i
=
m_InputImageListParam
->
GetImageList
()
->
Size
()
;
i
<
m_FileSelectionList
.
size
();
i
++
)
{
m_InputImageListParam
->
AddNullElement
();
}
for
(
unsigned
int
j
=
0
;
j
<
m_InputImageListParam
->
GetImageList
()
->
Size
();
j
++
)
{
if
(
m_InputImageListParam
->
SetNthFileName
(
j
,
m_FileSelectionList
[
j
]
->
GetFilename
())
==
false
)
...
...
@@ -298,7 +311,8 @@ QtWidgetInputImageListParameter::AddFile()
fileSelection
->
setFixedHeight
(
30
);
m_FileLayout
->
addWidget
(
fileSelection
);
m_FileSelectionList
.
push_back
(
fileSelection
);
m_InputImageListParam
->
AddNullElement
();
/* No need of AddNullElement() here. Moved adding NullElement when updating the list */
//m_InputImageListParam->AddNullElement();
connect
(
fileSelection
->
GetInput
(),
SIGNAL
(
textChanged
(
const
QString
&
)),
this
,
SLOT
(
UpdateImageList
()));
QGroupBox
*
mainGroup
=
new
QGroupBox
();
...
...
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