projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
df242e4
)
Show default bufferview if we don't have a saved state
author
Manuel Nickschas
<sputnick@quassel-irc.org>
Wed, 18 Nov 2009 22:52:23 +0000
(23:52 +0100)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Wed, 18 Nov 2009 22:52:23 +0000
(23:52 +0100)
src/qtui/mainwin.cpp
patch
|
blob
|
history
diff --git
a/src/qtui/mainwin.cpp
b/src/qtui/mainwin.cpp
index
9030bfd
..
2ff5701
100644
(file)
--- a/
src/qtui/mainwin.cpp
+++ b/
src/qtui/mainwin.cpp
@@
-747,7
+747,15
@@
void MainWin::setConnectedState() {
void MainWin::loadLayout() {
QtUiSettings s;
int accountId = Client::currentCoreAccount().toInt();
void MainWin::loadLayout() {
QtUiSettings s;
int accountId = Client::currentCoreAccount().toInt();
- restoreState(s.value(QString("MainWinState-%1").arg(accountId)).toByteArray(), accountId);
+ QByteArray state = s.value(QString("MainWinState-%1").arg(accountId)).toByteArray();
+ if(state.isEmpty()) {
+ // Make sure that the default bufferview is shown
+ if(_bufferViews.count())
+ _bufferViews.at(0)->show();
+ return;
+ }
+
+ restoreState(state, accountId);
_layoutLoaded = true;
}
_layoutLoaded = true;
}