Cosmetics.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20656 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-10-02 09:12:13 +00:00
parent 75e2698523
commit 5249b74e5b
4 changed files with 9 additions and 9 deletions

View File

@ -262,7 +262,7 @@ Buffer::~Buffer()
graphics::Previews::get().removeLoader(*this); graphics::Previews::get().removeLoader(*this);
if (pimpl_->wa_) { if (pimpl_->wa_) {
pimpl_->wa_->closing(); pimpl_->wa_->closeAll();
delete pimpl_->wa_; delete pimpl_->wa_;
} }
} }
@ -271,7 +271,7 @@ Buffer::~Buffer()
void Buffer::changed() void Buffer::changed()
{ {
if (pimpl_->wa_) if (pimpl_->wa_)
pimpl_->wa_->changed(); pimpl_->wa_->redrawAll();
} }

View File

@ -18,18 +18,18 @@
namespace lyx { namespace lyx {
namespace frontend { namespace frontend {
void WorkAreaManager::registerWorkArea(WorkArea * wa) void WorkAreaManager::add(WorkArea * wa)
{ {
work_areas_.push_back(wa); work_areas_.push_back(wa);
} }
void WorkAreaManager::changed() void WorkAreaManager::redrawAll()
{ {
for (size_t i = 0; i != work_areas_.size(); ++i) for (size_t i = 0; i != work_areas_.size(); ++i)
work_areas_[i]->redraw(); work_areas_[i]->redraw();
} }
void WorkAreaManager::closing() void WorkAreaManager::closeAll()
{ {
for (size_t i = 0; i != work_areas_.size(); ++i) for (size_t i = 0; i != work_areas_.size(); ++i)
work_areas_[i]->close(); work_areas_[i]->close();

View File

@ -25,13 +25,13 @@ public:
WorkAreaManager() {} WorkAreaManager() {}
/// ///
void registerWorkArea(WorkArea * wa); void add(WorkArea * wa);
/// ///
void changed(); void redrawAll();
/// ///
void closing(); void closeAll();
private: private:
std::vector<WorkArea *> work_areas_; std::vector<WorkArea *> work_areas_;

View File

@ -860,7 +860,7 @@ WorkArea * GuiViewBase::addWorkArea(Buffer & buffer)
// Hide tabbar if there's only one tab. // Hide tabbar if there's only one tab.
d.tab_widget_->showBar(d.tab_widget_->count() > 1); d.tab_widget_->showBar(d.tab_widget_->count() > 1);
/// ///
buffer.workAreaManager()->registerWorkArea(wa); buffer.workAreaManager()->add(wa);
return wa; return wa;
} }