mirror of https://github.com/vitalif/openscad
update the previous fix: SCN_SAVEPOINTLEFT() is only accessible in QScintilla >= 2.8, always save the file on actionSave()
parent
d064b9238f
commit
1cc4f6be53
|
@ -1237,8 +1237,6 @@ void MainWindow::actionSave()
|
||||||
actionSaveAs();
|
actionSaveAs();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!editor->isContentModified())
|
|
||||||
return;
|
|
||||||
setCurrentOutput();
|
setCurrentOutput();
|
||||||
QFile file(this->fileName);
|
QFile file(this->fileName);
|
||||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
|
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
|
||||||
|
|
|
@ -71,7 +71,9 @@ QString ScintillaEditor::toPlainText()
|
||||||
void ScintillaEditor::setContentModified(bool modified)
|
void ScintillaEditor::setContentModified(bool modified)
|
||||||
{
|
{
|
||||||
// FIXME: Due to an issue with QScintilla, we need to do this on the document itself.
|
// FIXME: Due to an issue with QScintilla, we need to do this on the document itself.
|
||||||
|
#if QSCINTILLA_VERSION >= 0x020800
|
||||||
qsci->SCN_SAVEPOINTLEFT();
|
qsci->SCN_SAVEPOINTLEFT();
|
||||||
|
#endif
|
||||||
qsci->setModified(modified);
|
qsci->setModified(modified);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue