Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asn1-value-editor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
asn1-value-editor
Commits
ae9d8bce
Commit
ae9d8bce
authored
Feb 15, 2018
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure last item put on the MSC is visible
Automatic scroll up when streaming
parent
e6b921ea
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
asn1_value_editor/mscStreamingScene.py
asn1_value_editor/mscStreamingScene.py
+6
-1
asn1_value_editor/test_msc_streaming.py
asn1_value_editor/test_msc_streaming.py
+2
-12
No files found.
asn1_value_editor/mscStreamingScene.py
View file @
ae9d8bce
...
...
@@ -70,6 +70,7 @@ class MscStreamingScene(MscGraphBasicMSCScene):
rst
=
super
(
MscStreamingScene
,
self
).
addMessage2
(
graphMsg
)
self
.
streamingControl
(
rst
)
rst
.
ensureVisible
()
return
rst
...
...
@@ -79,6 +80,7 @@ class MscStreamingScene(MscGraphBasicMSCScene):
y
=
y
-
self
.
globalDiff
rst
=
super
(
MscStreamingScene
,
self
).
addCondition
(
instance
,
y
,
label
)
self
.
streamingControl
(
rst
)
rst
.
ensureVisible
()
return
rst
...
...
@@ -88,6 +90,7 @@ class MscStreamingScene(MscGraphBasicMSCScene):
pos
=
instance
.
mapFromScene
(
0
,
y
)
rst
=
super
(
MscStreamingScene
,
self
).
addTimer
(
instance
,
pos
,
label
)
self
.
streamingControl
(
rst
)
rst
.
ensureVisible
()
return
rst
...
...
@@ -118,6 +121,7 @@ class MscStreamingScene(MscGraphBasicMSCScene):
y
=
y
-
self
.
globalDiff
rst
=
super
(
MscStreamingScene
,
self
).
addProcedure
(
instance
,
y
,
label
)
self
.
streamingControl
(
rst
)
rst
.
ensureVisible
()
return
rst
...
...
@@ -136,8 +140,9 @@ class MscStreamingScene(MscGraphBasicMSCScene):
def
streamingControl
(
self
,
element
):
''' Scroll up in streaming mode '''
#self.visible_items.append(element)
_
=
element
if
len
(
self
.
visible_items
)
>
self
.
max_items
:
#print "stream up"
item
=
self
.
visible_items
.
popleft
()
firstY
=
item
.
pos
().
y
()
self
.
removeGenericItem
(
item
)
...
...
asn1_value_editor/test_msc_streaming.py
View file @
ae9d8bce
...
...
@@ -64,20 +64,10 @@ def test_msc():
next_y
,
"Pong({})"
.
format
(
counter
))
add_item
(
item
)
print
"next y = "
,
next_y
msc_scene
.
mousePressEvent
=
click
# for _ in xrange (10):
# item = msc_scene.addMessage(gui_instance,
# taste_instance,
# next_y,
# "Ping({})".format(counter))
# add_item(item)
# item = msc_scene.addMessage(taste_instance,
# gui_instance,
# next_y,
# "Pong({})".format(counter))
# add_item(item)
app
.
exec_
()
...
...
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