Commit 91a9a241 authored by Daniel Teske's avatar Daniel Teske
Browse files

OutputPane: Flash the output button instead of switching to edit mode



That is if the current mode has no OutputPanePlaceHolder, then we don't
switch modes, but flash the button. Also if the button is not visible,
we make it visible. The button doesn't autohide though.

Task-number: QTCREATORBUG-7272
Change-Id: I5ceacd2a17d1ece744f28952819c34bfcfdd5e7b
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 80502c61
...@@ -465,10 +465,14 @@ void OutputPaneManager::setBadgeNumber(int number) ...@@ -465,10 +465,14 @@ void OutputPaneManager::setBadgeNumber(int number)
void OutputPaneManager::showPage(bool focus, bool ensureSizeHint) void OutputPaneManager::showPage(bool focus, bool ensureSizeHint)
{ {
int idx = findIndexForPage(qobject_cast<IOutputPane*>(sender())); int idx = findIndexForPage(qobject_cast<IOutputPane*>(sender()));
showPage(idx, focus); OutputPanePlaceHolder *ph = OutputPanePlaceHolder::getCurrent();
if (ensureSizeHint) if (!ph)
if (OutputPanePlaceHolder *ph = OutputPanePlaceHolder::getCurrent()) m_buttons.value(idx)->flash();
ph->ensureSizeHintAsMinimum(); else
showPage(idx, focus);
if (ensureSizeHint && ph)
ph->ensureSizeHintAsMinimum();
} }
void OutputPaneManager::showPage(int idx, bool focus) void OutputPaneManager::showPage(int idx, bool focus)
...@@ -705,6 +709,7 @@ void OutputPaneToggleButton::checkStateSet() ...@@ -705,6 +709,7 @@ void OutputPaneToggleButton::checkStateSet()
void OutputPaneToggleButton::flash(int count) void OutputPaneToggleButton::flash(int count)
{ {
setVisible(true);
//Start flashing if button is not checked //Start flashing if button is not checked
if (!isChecked()) { if (!isChecked()) {
m_flashTimer->setLoopCount(count); m_flashTimer->setLoopCount(count);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment