r23932 by jghali - #16174: Simplify a few UndoManager::instance()->undoEnabled() calls, using UndoManager::undoEnabled() is sufficient
scribus-commit
scribus-commit at lists.scribus.net
Mon Jul 20 05:04:23 UTC 2020
Author: jghali
Date: Mon Jul 20 05:04:23 2020
New Revision: 23932
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23932
Log:
#16174: Simplify a few UndoManager::instance()->undoEnabled() calls, using UndoManager::undoEnabled() is sufficient
Modified:
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/ui/notesstyleseditor.cpp
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23932&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Mon Jul 20 05:04:23 2020
@@ -9589,7 +9589,7 @@
return;
UndoTransaction trans;
- if (UndoManager::instance()->undoEnabled())
+ if (UndoManager::undoEnabled())
trans = m_undoManager->beginTransaction();
ScItemsState* is = nullptr;
@@ -9672,7 +9672,7 @@
UndoTransaction trans;
if (currItem->HasSel)
{
- if (UndoManager::instance()->undoEnabled())
+ if (UndoManager::undoEnabled())
trans = m_undoManager->beginTransaction(Um::Selection,Um::IDelete,Um::Delete,"",Um::IDelete);
//inserting mark replace some selected text
currItem->asTextFrame()->deleteSelectedTextFromFrame();
@@ -9763,7 +9763,7 @@
UndoTransaction trans;
if (currItem->HasSel)
{
- if (UndoManager::instance()->undoEnabled())
+ if (UndoManager::undoEnabled())
trans = m_undoManager->beginTransaction(Um::Selection, Um::IDelete, Um::Delete, QString(), Um::IDelete);
//inserting mark replace some selected text
currItem->asTextFrame()->deleteSelectedTextFromFrame();
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23932&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Mon Jul 20 05:04:23 2020
@@ -17127,7 +17127,7 @@
if (noteStyle == m_docNotesStylesList.at(0))
return;
UndoTransaction activeTransaction;
- if (UndoManager::instance()->undoEnabled())
+ if (UndoManager::undoEnabled())
activeTransaction = m_undoManager->beginTransaction(Um::DeleteNotesStyle, Um::IDelete, Um::Delete, "", Um::IDelete);
QList<TextNote*> toDel;
//search for notes to deleting
Modified: trunk/Scribus/scribus/ui/notesstyleseditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23932&path=/trunk/Scribus/scribus/ui/notesstyleseditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/notesstyleseditor.cpp (original)
+++ trunk/Scribus/scribus/ui/notesstyleseditor.cpp Mon Jul 20 05:04:23 2020
@@ -294,7 +294,7 @@
if (*NS != n)
{
SimpleState* ss = nullptr;
- if (UndoManager::instance()->undoEnabled())
+ if (UndoManager::undoEnabled())
{
ss = new SimpleState(UndoManager::EditNotesStyle);
ss->set("NSTYLE", QString("edit"));
More information about the scribus-commit
mailing list