View Issue Details

IDProjectCategoryView StatusLast Update
0009522ScribusStory Editor / Text Framespublic2011-01-04 10:29
Reportercezaryece Assigned Tocbradney  
PrioritynormalSeveritymajorReproducibilityN/A
Status closedResolutionduplicate 
Summary0009522: [PATCH] for disabling Undo/Redo while typing text in text frames
DescriptionAs temporally workaround for losing data after Undo while editing text in newly created text frame I prepare patch for disabling Undo/Redo shortcuts while text cursor is visible - I found this as simplest way for recognize that text is edited.
TagsNo tags attached.
Patch

Relationships

duplicate of 0009568 closedplinnell [FEATURE SOLVED] undow for text frames 

Activities

cezaryece

2010-11-25 11:58

updater  

no_txt_undo_canvasmode_edit.cpp.patch (890 bytes)   
Index: Scribus/scribus/canvasmode_edit.cpp
===================================================================
--- Scribus/scribus/canvasmode_edit.cpp	(wersja 15961)
+++ Scribus/scribus/canvasmode_edit.cpp	(kopia robocza)
@@ -351,7 +351,11 @@
        if (GetItem(&it))
        {
                if (it->asTextFrame())
+		{
                        m_canvas->setupEditHRuler(it, true);
+			m_doc->scMW()->scrActions["editUndoAction"].data()->saveShortcut();
+			m_doc->scMW()->scrActions["editRedoAction"].data()->saveShortcut();
+		}
        }
 }

@@ -359,6 +363,10 @@
 {
 //	qDebug() << "CanvasMode_Edit::deactivate" << forGesture;
        m_view->redrawMarker->hide();
+
+	m_doc->scMW()->scrActions["editUndoAction"].data()->restoreShortcut();
+	m_doc->scMW()->scrActions["editRedoAction"].data()->restoreShortcut();
+
        if (!forGesture)
        {
                m_RulerGuide = -1;

ale

2010-11-25 12:11

manager   ~0024892

interesting approach!

imo, this solves 90% of the problems with the missing undo for text editing.

on top of it, i would add a condition to the undo system which avoids the deletion (by the undo system) of a text frame which is not empty.

cezaryece

2010-11-25 14:37

updater  

no_txt_undo_canvasmode_edit.cppFIX.patch (1,123 bytes)   
Index: Scribus/scribus/canvasmode_edit.cpp
===================================================================
--- Scribus/scribus/canvasmode_edit.cpp	(wersja 15961)
+++ Scribus/scribus/canvasmode_edit.cpp	(kopia robocza)
@@ -58,8 +58,8 @@
 #include "util.h"
 #include "util_icon.h"
 #include "util_math.h"
+#include "scraction.h"

-
 CanvasMode_Edit::CanvasMode_Edit(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW)
 {
        Mxp = Myp = -1;
@@ -351,7 +351,11 @@
        if (GetItem(&it))
        {
                if (it->asTextFrame())
+		{
                        m_canvas->setupEditHRuler(it, true);
+			m_doc->scMW()->scrActions["editUndoAction"].data()->saveShortcut();
+			m_doc->scMW()->scrActions["editRedoAction"].data()->saveShortcut();
+		}
        }
 }

@@ -359,6 +363,10 @@
 {
 //	qDebug() << "CanvasMode_Edit::deactivate" << forGesture;
        m_view->redrawMarker->hide();
+
+	m_doc->scMW()->scrActions["editUndoAction"].data()->restoreShortcut();
+	m_doc->scMW()->scrActions["editRedoAction"].data()->restoreShortcut();
+
        if (!forGesture)
        {
                m_RulerGuide = -1;

cezaryece

2010-11-25 14:38

updater   ~0024893

In first patch I was make mistake not including proper header file and as I cant delete uploaded files so I was upload new one.

cezaryece

2011-01-02 11:42

updater   ~0025230

As patch for almost complete undo for text was submitted there is no need for disabling undo in edit mode.
Close this report and forget.

cbradney

2011-01-02 13:02

administrator   ~0025232

Closing as 9568 should be committed.

Issue History

Date Modified Username Field Change
2010-11-25 11:58 cezaryece New Issue
2010-11-25 11:58 cezaryece File Added: no_txt_undo_canvasmode_edit.cpp.patch
2010-11-25 12:11 ale Note Added: 0024892
2010-11-25 14:37 cezaryece File Added: no_txt_undo_canvasmode_edit.cppFIX.patch
2010-11-25 14:38 cezaryece Note Added: 0024893
2011-01-02 11:42 cezaryece Note Added: 0025230
2011-01-02 13:02 cbradney Note Added: 0025232
2011-01-02 13:02 cbradney Relationship added duplicate of 0009568
2011-01-02 13:02 cbradney Status new => resolved
2011-01-02 13:02 cbradney Resolution open => won't fix
2011-01-02 13:02 cbradney Assigned To => cbradney
2011-01-04 10:29 plinnell Severity tweak => major
2011-01-04 10:29 plinnell Status resolved => closed
2011-01-04 10:29 plinnell Resolution won't fix => duplicate
2015-09-17 20:08 Kunda Category Story Editor / Text Frames => Story Ed/Txt Frames
2015-09-17 20:12 Kunda Category Story Ed/Txt Frames => Story Editor / Text Frames