Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc-1.1
Commits
2f5b226d
Commit
2f5b226d
authored
Dec 04, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Selection is almost working correctly
parent
b083e1e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
modules/gui/skins2/controls/ctrl_tree.cpp
modules/gui/skins2/controls/ctrl_tree.cpp
+6
-3
No files found.
modules/gui/skins2/controls/ctrl_tree.cpp
View file @
2f5b226d
...
...
@@ -212,6 +212,7 @@ void CtrlTree::onPositionChange()
void
CtrlTree
::
handleEvent
(
EvtGeneric
&
rEvent
)
{
VarTree
::
Iterator
toShow
;
bool
needShow
=
false
;
if
(
rEvent
.
getAsString
().
find
(
"key:down"
)
!=
string
::
npos
)
{
int
key
=
((
EvtKey
&
)
rEvent
).
getKey
();
...
...
@@ -233,9 +234,9 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
if
(
nextWasSelected
)
{
m_pLastSelected
=
&*
it
;
needShow
=
true
;
toShow
=
it
;
}
}
ensureVisible
(
it
);
}
else
if
(
key
==
KEY_DOWN
)
{
...
...
@@ -249,13 +250,13 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
if
(
previousWasSelected
)
{
m_pLastSelected
=
&*
it
;
needShow
=
true
;
toShow
=
it
;
previousWasSelected
=
false
;
}
else
{
previousWasSelected
=
(
&*
it
==
m_pLastSelected
);
}
ensureVisible
(
it
);
}
else
if
(
key
==
KEY_RIGHT
)
{
...
...
@@ -310,6 +311,8 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
}
}
}
if
(
needShow
)
ensureVisible
(
toShow
);
// Redraw the control
makeImage
();
...
...
@@ -475,7 +478,7 @@ bool CtrlTree::ensureVisible( VarTree::Iterator item )
for
(
it
=
m_rTree
.
begin
();
it
!=
m_rTree
.
end
();
it
=
m_rTree
.
getNextVisibleItem
(
it
)
)
{
if
(
it
==
item
)
break
;
if
(
it
->
m_id
==
item
->
m_id
)
break
;
focusItemIndex
++
;
}
return
ensureVisible
(
focusItemIndex
);
...
...
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