Skip to content

Commit

Permalink
Merge branch 'master' into parallaxe_movement
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlamhauge authored Jan 9, 2025
2 parents 1948303 + b6c8b3a commit 80683cf
Show file tree
Hide file tree
Showing 63 changed files with 19,341 additions and 14,183 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
+ Fix hanging when adjusting cursor because of too many writes to disk [#1853](https://github.com/pencil2d/pencil/pull/1853)
+ Avoid updating width/feather sliders for tools that don’t use them [cce3107](https://github.com/pencil2d/pencil/commit/cce31079c871fcc04e957c44d5c6e65990f635f1)
+ Fix fill misbehaving when drawing was partly outside border [#1865](https://github.com/pencil2d/pencil/pull/1865)
+ Fix clearing selection with the delete shortcut [#1892](https://github.com/pencil2d/pencil/pull/1892)

## Pencil2D v0.7.0 - 12 July 2024

Expand Down
3 changes: 3 additions & 0 deletions app/data/org.pencil2d.Pencil2D.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Keywords=picture;drawing;vector;bitmap;cartoon;animation;
# Translations


# Translations


# Translations
Name[ar]=بنسل2دي
GenericName[ar]=برنامج رسوم متحركة
Expand Down
12 changes: 12 additions & 0 deletions app/src/errordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ GNU General Public License for more details.
#include "errordialog.h"
#include "ui_errordialog.h"

#include <QPushButton>
#include <QClipboard>

ErrorDialog::ErrorDialog( QString title, QString description, QString details, QWidget *parent ) :
QDialog( parent ),
ui(new Ui::ErrorDialog)
Expand All @@ -34,9 +37,18 @@ ErrorDialog::ErrorDialog( QString title, QString description, QString details, Q
{
ui->details->setText( QString( "<pre>%1</pre>" ).arg( details ) );
}

QPushButton* copyToClipboard = new QPushButton(tr("Copy to Clipboard"));
ui->buttonBox->addButton(copyToClipboard, QDialogButtonBox::ActionRole);

connect(copyToClipboard, &QPushButton::clicked, this, &ErrorDialog::onCopyToClipboard);
}

ErrorDialog::~ErrorDialog()
{
delete ui;
}

void ErrorDialog::onCopyToClipboard() {
QGuiApplication::clipboard()->setText(ui->details->toPlainText());
}
3 changes: 3 additions & 0 deletions app/src/errordialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class ErrorDialog : public QDialog
explicit ErrorDialog(QString title, QString description, QString details = QString(), QWidget *parent = nullptr);
~ErrorDialog();

public slots:
void onCopyToClipboard();

private:
Ui::ErrorDialog *ui;
};
Expand Down
8 changes: 1 addition & 7 deletions app/src/mainwindow2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ GNU General Public License for more details.
#include "pencilsettings.h"
#include "object.h"
#include "editor.h"
#include "polylinetool.h"

#include "filemanager.h"
#include "colormanager.h"
Expand Down Expand Up @@ -265,7 +264,6 @@ void MainWindow2::createMenus()

//--- Edit Menu ---
replaceUndoRedoActions();
connect(ui->actionRemoveLastPolylineSegment, &QAction::triggered, static_cast<PolylineTool*>(mEditor->tools()->getTool(POLYLINE)), &PolylineTool::removeLastPolylineSegment);
connect(ui->actionCut, &QAction::triggered, mEditor, &Editor::copyAndCut);
connect(ui->actionCopy, &QAction::triggered, mEditor, &Editor::copy);
connect(ui->actionPaste_Previous, &QAction::triggered, mEditor, &Editor::pasteFromPreviousFrame);
Expand Down Expand Up @@ -774,7 +772,7 @@ bool MainWindow2::saveObject(QString strSavedFileName)

ErrorDialog errorDialog(st.title(),
st.description().append(tr("<br><br>An error has occurred and your file may not have saved successfully."
"If you believe that this error is an issue with Pencil2D, please create a new issue at:"
"\nIf you believe that this error is an issue with Pencil2D, please create a new issue at:"
"<br><a href='https://github.com/pencil2d/pencil/issues'>https://github.com/pencil2d/pencil/issues</a><br>"
"Please be sure to include the following details in your issue:")), st.details().html());
errorDialog.exec();
Expand Down Expand Up @@ -1208,7 +1206,6 @@ void MainWindow2::setupKeyboardShortcuts()
// edit menu
ui->actionUndo->setShortcut(cmdKeySeq(CMD_UNDO));
ui->actionRedo->setShortcut(cmdKeySeq(CMD_REDO));
ui->actionRemoveLastPolylineSegment->setShortcut(cmdKeySeq(CMD_REMOVE_LAST_POLYLINE_SEGMENT));
ui->actionCut->setShortcut(cmdKeySeq(CMD_CUT));
ui->actionCopy->setShortcut(cmdKeySeq(CMD_COPY));
ui->actionPaste_Previous->setShortcut(cmdKeySeq(CMD_PASTE_FROM_PREVIOUS));
Expand Down Expand Up @@ -1324,9 +1321,6 @@ void MainWindow2::setupKeyboardShortcuts()

ui->actionHelp->setShortcut(cmdKeySeq(CMD_HELP));
ui->actionExit->setShortcut(cmdKeySeq(CMD_EXIT));

// Actions not in a menu won't work unless added to a widget
addAction(ui->actionRemoveLastPolylineSegment);
}

void MainWindow2::clearKeyboardShortcuts()
Expand Down
1 change: 0 additions & 1 deletion app/src/shortcutspage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ static QString getHumanReadableShortcutName(const QString& cmdName)
{CMD_CHANGE_LINE_COLOR_LAYER, ShortcutsPage::tr("Change Line Color (All keyframes on layer)", "Shortcut")},
{CMD_CHANGE_LAYER_OPACITY, ShortcutsPage::tr("Change Layer / Keyframe Opacity", "Shortcut")},
{CMD_UNDO, ShortcutsPage::tr("Undo", "Shortcut")},
{CMD_REMOVE_LAST_POLYLINE_SEGMENT, ShortcutsPage::tr("Remove Last Polyline Segment", "Shortcut")},
{CMD_ZOOM_100, ShortcutsPage::tr("Set Zoom to 100%", "Shortcut")},
{CMD_ZOOM_200, ShortcutsPage::tr("Set Zoom to 200%", "Shortcut")},
{CMD_ZOOM_25, ShortcutsPage::tr("Set Zoom to 25%", "Shortcut")},
Expand Down
33 changes: 33 additions & 0 deletions app/translations/mui_yue.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Translators:
# Yu Chen <[email protected]>, 2024
# Matt Chang, 2024
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-22 15:26+0200\n"
"PO-Revision-Date: 2024-05-19 14:29+0000\n"
"Last-Translator: Matt Chang, 2024\n"
"Language-Team: Cantonese (https://app.transifex.com/pencil2d/teams/76612/yue/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: yue\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Accelerator-Marker: &\n"
"X-Generator: Translate Toolkit 3.9.0\n"
"X-Merge-On: location\n"

#: STRINGTABLE.0
msgid "Pencil2D"
msgstr "Pencil2D"

#: STRINGTABLE.1
msgid "Pencil2D Animation"
msgstr "Pencil2D動畫"

#: STRINGTABLE.2
msgid "Pencil2D Animation (Old Format)"
msgstr "Pencil2D動畫 (舊格式)"
33 changes: 33 additions & 0 deletions app/translations/mui_zh_CN.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Translators:
# Yu Chen <[email protected]>, 2024
# Matt Chang, 2024
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-22 15:26+0200\n"
"PO-Revision-Date: 2024-05-19 14:29+0000\n"
"Last-Translator: Matt Chang, 2024\n"
"Language-Team: Chinese (China) (https://app.transifex.com/pencil2d/teams/76612/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Accelerator-Marker: &\n"
"X-Generator: Translate Toolkit 3.9.0\n"
"X-Merge-On: location\n"

#: STRINGTABLE.0
msgid "Pencil2D"
msgstr "Pencil2D"

#: STRINGTABLE.1
msgid "Pencil2D Animation"
msgstr "Pencil2D動畫"

#: STRINGTABLE.2
msgid "Pencil2D Animation (Old Format)"
msgstr "Pencil2D動畫 (舊格式)"
32 changes: 32 additions & 0 deletions app/translations/mui_zh_TW.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Translators:
# Matt Chang, 2024
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-22 15:26+0200\n"
"PO-Revision-Date: 2024-05-19 14:29+0000\n"
"Last-Translator: Matt Chang, 2024\n"
"Language-Team: Chinese (Taiwan) (https://app.transifex.com/pencil2d/teams/76612/zh_TW/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_TW\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Accelerator-Marker: &\n"
"X-Generator: Translate Toolkit 3.9.0\n"
"X-Merge-On: location\n"

#: STRINGTABLE.0
msgid "Pencil2D"
msgstr "Pencil2D"

#: STRINGTABLE.1
msgid "Pencil2D Animation"
msgstr "Pencil2D動畫"

#: STRINGTABLE.2
msgid "Pencil2D Animation (Old Format)"
msgstr "Pencil2D動畫 (舊格式)"
10 changes: 10 additions & 0 deletions app/ui/errordialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>This report contains vital information. Copy all of it when submitting a bug.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="details">
<property name="readOnly">
Expand Down
1 change: 0 additions & 1 deletion core_lib/data/resources/kb.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ CmdExportMovie=
CmdExportGIF=Ctrl+G
CmdExportPalette=
CmdUndo=Ctrl+Z
CmdRemoveLastPolylineSegment=Backspace
CmdRedo=Ctrl+Shift+Z
CmdCut=Ctrl+X
CmdCopy=Ctrl+C
Expand Down
9 changes: 7 additions & 2 deletions core_lib/src/graphics/bitmap/bitmapimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,9 +742,14 @@ Status BitmapImage::writeFile(const QString& filename)
if(f.exists())
{
bool b = f.remove();
return (b) ? Status::OK : Status::FAIL;
if (!b) {
return Status::FAIL;
}
}
return Status::SAFE;

// The frame is likely empty, act like there's no file name
// so we don't end up writing to it later.
setFileName("");
}
return Status::SAFE;
}
Expand Down
1 change: 1 addition & 0 deletions core_lib/src/graphics/vector/vectorimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ GNU General Public License for more details.
#include <QDebug>
#include <QXmlStreamWriter>
#include "object.h"
#include "util.h"


VectorImage::VectorImage()
Expand Down
2 changes: 1 addition & 1 deletion core_lib/src/managers/undoredomanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Status UndoRedoManager::save(Object* /*o*/)
{
if (mNewBackupSystemEnabled) {
mUndoStack.setClean();
} else {
} else if (!mLegacyBackupList.isEmpty() && mLegacyBackupIndex < mLegacyBackupList.count()) {
mLegacyBackupAtSave = mLegacyBackupList[mLegacyBackupIndex];
}
return Status::OK;
Expand Down
Loading

0 comments on commit 80683cf

Please sign in to comment.