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
016a90f1
Commit
016a90f1
authored
Jan 12, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4_message: when the cursor it at the end, scroll down automatically.
parent
0333e0c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.cpp
+14
-5
No files found.
modules/gui/qt4/dialogs/messages.cpp
View file @
016a90f1
...
@@ -182,6 +182,8 @@ void MessagesDialog::sinkMessage (msg_item_t *item, unsigned)
...
@@ -182,6 +182,8 @@ void MessagesDialog::sinkMessage (msg_item_t *item, unsigned)
int
endPos
=
messages
->
textCursor
().
selectionEnd
();
int
endPos
=
messages
->
textCursor
().
selectionEnd
();
messages
->
moveCursor
(
QTextCursor
::
End
);
messages
->
moveCursor
(
QTextCursor
::
End
);
if
(
startPos
==
endPos
&&
messages
->
textCursor
().
selectionEnd
()
==
endPos
)
endPos
=
0
;
messages
->
setFontItalic
(
true
);
messages
->
setFontItalic
(
true
);
messages
->
setTextColor
(
"darkBlue"
);
messages
->
setTextColor
(
"darkBlue"
);
messages
->
insertPlainText
(
qfu
(
item
->
psz_module
)
);
messages
->
insertPlainText
(
qfu
(
item
->
psz_module
)
);
...
@@ -215,11 +217,18 @@ void MessagesDialog::sinkMessage (msg_item_t *item, unsigned)
...
@@ -215,11 +217,18 @@ void MessagesDialog::sinkMessage (msg_item_t *item, unsigned)
messages
->
ensureCursorVisible
();
messages
->
ensureCursorVisible
();
// Restoring saved cursor selection
// Restoring saved cursor selection
// If the cursor was at this end, put it at the end,
// so we don't need to scroll down.
if
(
endPos
==
0
)
messages
->
moveCursor
(
QTextCursor
::
End
);
else
{
QTextCursor
cur
=
messages
->
textCursor
();
QTextCursor
cur
=
messages
->
textCursor
();
cur
.
movePosition
(
QTextCursor
::
Start
);
cur
.
movePosition
(
QTextCursor
::
Start
);
cur
.
movePosition
(
QTextCursor
::
NextCharacter
,
QTextCursor
::
MoveAnchor
,
startPos
);
cur
.
movePosition
(
QTextCursor
::
NextCharacter
,
QTextCursor
::
MoveAnchor
,
startPos
);
cur
.
movePosition
(
QTextCursor
::
NextCharacter
,
QTextCursor
::
KeepAnchor
,
endPos
-
startPos
);
cur
.
movePosition
(
QTextCursor
::
NextCharacter
,
QTextCursor
::
KeepAnchor
,
endPos
-
startPos
);
messages
->
setTextCursor
(
cur
);
messages
->
setTextCursor
(
cur
);
}
}
}
void
MessagesDialog
::
customEvent
(
QEvent
*
event
)
void
MessagesDialog
::
customEvent
(
QEvent
*
event
)
{
{
...
...
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