View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009522 | Scribus | Story Editor / Text Frames | public | 2010-11-25 11:58 | 2011-01-04 10:29 |
Reporter | cezaryece | Assigned To | cbradney | ||
Priority | normal | Severity | major | Reproducibility | N/A |
Status | closed | Resolution | duplicate | ||
Summary | 0009522: [PATCH] for disabling Undo/Redo while typing text in text frames | ||||
Description | As 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. | ||||
Tags | No tags attached. | ||||
Patch | |||||
duplicate of | 0009568 | closed | [FEATURE SOLVED] undow for text frames |
|
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; |
|
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. |
|
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; |
|
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. |
|
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. |
|
Closing as 9568 should be committed. |
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 |
|
Severity | tweak => major |
2011-01-04 10:29 |
|
Status | resolved => closed |
2011-01-04 10:29 |
|
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 |