[DEV] feature hide buffer list when number of buffer <= 1

This commit is contained in:
Edouard DUPIN 2014-10-27 21:24:48 +01:00
parent 2330788ace
commit bd9e5f03f4

View File

@ -50,6 +50,7 @@ BufferView::BufferView() :
m_colorBackgroundSelect = m_paintingProperties->request("backgroungSelected");
m_colorTextNormal = m_paintingProperties->request("textNormal");
m_colorTextModify = m_paintingProperties->request("textModify");
hide();
}
void BufferView::init() {
@ -101,6 +102,11 @@ void BufferView::onCallbackNewBuffer(const std::string& _value) {
} else {
insertAlphabetic(tmp);
}
if (m_list.size() <= 1) {
hide();
} else {
show();
}
markToRedraw();
}
@ -147,6 +153,11 @@ void BufferView::onCallbackBufferRemoved(const std::shared_ptr<appl::Buffer>& _b
++it;
}
}
if (m_list.size() <= 1) {
hide();
} else {
show();
}
markToRedraw();
}
void BufferView::onCallbackIsSave() {