font.setStyleHint(QFont::SansSerif);
font.setWeight(QFont::Bold);
font.setPointSize(int(toqstr(lyxrc.font_sizes[FONT_SIZE_LARGE]).toDouble()));
- int width = QFontMetrics(font).width(text);
pain.setFont(font);
- pain.drawText(397 - width, 15, text);
+ pain.drawText(190, 225, text);
setFocusPolicy(Qt::StrongFocus);
}
in_show_(false)
{
// hardcode here the platform specific icon size
- smallIconSize = 14; // scaling problems
- normalIconSize = 20; // ok, default
+ smallIconSize = 16; // scaling problems
+ normalIconSize = 22; // ok, default if iconsize.png is missing
bigIconSize = 26; // better for some math icons
+ // if it exists, use width of iconsize.png as normal size
+ FileName const fn = lyx::libFileSearch("images", "iconsize.png");
+ if (!fn.empty()) {
+ QImage image(toqstr(fn.absFileName()));
+ if (image.width() < int(smallIconSize))
+ normalIconSize = smallIconSize;
+ else if (image.width() > int(bigIconSize))
+ normalIconSize = bigIconSize;
+ else
+ normalIconSize = image.width();
+ }
+
splitter_ = new QSplitter;
bg_widget_ = new BackgroundWidget;
stack_widget_ = new QStackedWidget;
message(watcher->result());
updateToolbars();
if (show_errors) {
+ BufferView const * const bv = currentBufferView();
+ if (bv && !bv->buffer().errorList("Export").empty()) {
+ errors("Export");
+ return;
+ }
errors(d.last_export_format);
}
}
return;
if (d.current_work_area_) {
- d.current_work_area_->setUpdatesEnabled(!busy);
+ //Why would we want to stop updates only for one workarea and
+ //not for the others ? This leads to problems as in #7314 (vfr).
+ //d.current_work_area_->setUpdatesEnabled(!busy);
if (busy)
d.current_work_area_->stopBlinkingCursor();
else
{
LYXERR(Debug::DEBUG, "Setting buffer: " << newBuffer << endl);
LASSERT(newBuffer, return);
- setBusy(true);
-
+
GuiWorkArea * wa = workArea(*newBuffer);
if (wa == 0) {
+ setBusy(true);
newBuffer->masterBuffer()->updateBuffer();
+ setBusy(false);
wa = addWorkArea(*newBuffer);
// scroll to the position when the BufferView was last closed
if (lyxrc.use_lastfilepos) {
connectBuffer(*newBuffer);
connectBufferView(wa->bufferView());
setCurrentWorkArea(wa);
-
- setBusy(false);
}
if (!bv)
return;
+#if EXPORT_in_THREAD && (QT_VERSION >= 0x040400)
+ // We are called with from_master == false by default, so we
+ // have to figure out whether that is the case or not.
+ ErrorList & el = bv->buffer().errorList(error_type);
+ if (el.empty()) {
+ el = bv->buffer().masterBuffer()->errorList(error_type);
+ from_master = true;
+ }
+#else
ErrorList & el = from_master ?
bv->buffer().masterBuffer()->errorList(error_type) :
bv->buffer().errorList(error_type);
+#endif
+
if (el.empty())
return;
Buffer * buffer = documentBufferView()
? &documentBufferView()->buffer() : 0;
- if (!buffer)
+ if (!buffer) {
+ resetAutosaveTimers();
return;
+ }
#if (QT_VERSION >= 0x040400)
GuiViewPrivate::busyBuffers.insert(buffer);
setBusy(false);
throw(e);
}
+ setBusy(false);
if (!newBuffer) {
message(_("Document not loaded."));
- setBusy(false);
return 0;
}
if (tolastfiles)
theSession().lastFiles().add(filename);
- setBusy(false);
return newBuffer;
}
}
case LFUN_DIALOG_TOGGLE: {
- if (isDialogVisible(cmd.getArg(0)))
- dispatch(FuncRequest(LFUN_DIALOG_HIDE, cmd.argument()), dr);
- else
- dispatch(FuncRequest(LFUN_DIALOG_SHOW, cmd.argument()), dr);
+ FuncCode const func_code = isDialogVisible(cmd.getArg(0))
+ ? LFUN_DIALOG_HIDE : LFUN_DIALOG_SHOW;
+ dispatch(FuncRequest(func_code, cmd.argument()), dr);
break;
}