in_show_(false)
{
// hardcode here the platform specific icon size
- smallIconSize = 14; // scaling problems
- normalIconSize = 20; // ok, default
- bigIconSize = 26; // better for some math icons
+ smallIconSize = 14; // scaling problems
+ normalIconSize = 20; // ok, default
+ bigIconSize = 26; // better for some math icons
splitter_ = new QSplitter;
bg_widget_ = new BackgroundWidget;
return;
}
GuiWorkArea * old_gwa = theGuiApp()->currentView()->currentWorkArea();
- if (old_gwa != wa) {
- theGuiApp()->setCurrentView(this);
- d.current_work_area_ = wa;
- for (int i = 0; i != d.splitter_->count(); ++i) {
- if (d.tabWorkArea(i)->setCurrentWorkArea(wa)) {
- if (d.current_main_work_area_)
- d.current_main_work_area_->setFrameStyle(QFrame::NoFrame);
- d.current_main_work_area_ = wa;
- d.current_main_work_area_->setFrameStyle(QFrame::Box | QFrame::Plain);
- d.current_main_work_area_->setLineWidth(2);
- LYXERR(Debug::DEBUG, "Current wa: " << currentWorkArea() << ", Current main wa: " << currentMainWorkArea());
- return;
- }
+ if (old_gwa == wa)
+ return;
+
+ theGuiApp()->setCurrentView(this);
+ d.current_work_area_ = wa;
+ for (int i = 0; i != d.splitter_->count(); ++i) {
+ if (d.tabWorkArea(i)->setCurrentWorkArea(wa)) {
+ //if (d.current_main_work_area_)
+ // d.current_main_work_area_->setFrameStyle(QFrame::NoFrame);
+ d.current_main_work_area_ = wa;
+ //d.current_main_work_area_->setFrameStyle(QFrame::Box | QFrame::Plain);
+ //d.current_main_work_area_->setLineWidth(2);
+ LYXERR(Debug::DEBUG, "Current wa: " << currentWorkArea() << ", Current main wa: " << currentMainWorkArea());
+ return;
}
- LYXERR(Debug::DEBUG, "This is not a tabbed wa");
- on_currentWorkAreaChanged(wa);
- BufferView & bv = wa->bufferView();
- bv.cursor().fixIfBroken();
- bv.updateMetrics();
- wa->setUpdatesEnabled(true);
}
+ LYXERR(Debug::DEBUG, "This is not a tabbed wa");
+ on_currentWorkAreaChanged(wa);
+ BufferView & bv = wa->bufferView();
+ bv.cursor().fixIfBroken();
+ bv.updateMetrics();
+ wa->setUpdatesEnabled(true);
LYXERR(Debug::DEBUG, "Current wa: " << currentWorkArea() << ", Current main wa: " << currentMainWorkArea());
}
GuiWorkArea * wa = workArea(*newBuffer);
if (wa == 0) {
- updateLabels(*newBuffer->masterBuffer());
+ newBuffer->masterBuffer()->updateLabels();
wa = addWorkArea(*newBuffer);
} else {
//Disconnect the old buffer...there's no new one.
break;
case LFUN_COMPLETION_ACCEPT:
- case LFUN_COMPLETION_CANCEL:
+ if (!d.current_work_area_
+ || (!d.current_work_area_->completer().popupVisible()
+ && !d.current_work_area_->completer().inlineVisible()
+ && !d.current_work_area_->completer().completionAvailable()))
+ enable = false;
+ break;
+
+ case LFUN_COMPLETION_CANCEL:
if (!d.current_work_area_
|| (!d.current_work_area_->completer().popupVisible()
&& !d.current_work_area_->completer().inlineVisible()))
docstring str2;
Buffer * buf = loadDocument(fullname);
if (buf) {
- updateLabels(*buf);
-
+ buf->updateLabels();
setBuffer(buf);
buf->errors("Parse");
str2 = bformat(_("Document %1$s opened."), disp_fn);
Buffer * buf = lv->loadDocument(lyxfile);
if (!buf)
return false;
- updateLabels(*buf);
+ buf->updateLabels();
lv->setBuffer(buf);
buf->errors("Parse");
} else {