[kde-doc-english] [calligra/kexi-wip-tanis] kexi/plugins/tables: Show Undo/Redo buttons for Tables in design view.

Dimitrios T. Tanis dimitrios.tanis at kdemail.net
Thu Oct 4 22:20:04 UTC 2012


Git commit 81e137fcbed21e1a1e6dc3f06250e9e386c2c8f5 by Dimitrios T. Tanis.
Committed on 05/10/2012 at 00:14.
Pushed by tanis into branch 'kexi-wip-tanis'.

Show Undo/Redo buttons for Tables in design view.

Added Undo/Redo buttons to Table view when in design mode so that they
are available for porting Undo/Redo code to KoUndo.

CCBUG: 304757
GUI: Added Undo/Redo buttons in Tables when in design view.

M  +3    -1    kexi/plugins/tables/kexitabledesignerview.cpp

http://commits.kde.org/calligra/81e137fcbed21e1a1e6dc3f06250e9e386c2c8f5

diff --git a/kexi/plugins/tables/kexitabledesignerview.cpp b/kexi/plugins/tables/kexitabledesignerview.cpp
index 79284f1..6fe4241 100644
--- a/kexi/plugins/tables/kexitabledesignerview.cpp
+++ b/kexi/plugins/tables/kexitabledesignerview.cpp
@@ -196,7 +196,6 @@ KexiTableDesignerView::KexiTableDesignerView(QWidget *parent)
     a->setToolTip(i18n("Sets or removes primary key"));
     a->setWhatsThis(i18n("Sets or removes primary key for currently selected field."));
     connect(a, SIGNAL(triggered()), this, SLOT(slotTogglePrimaryKey()));
-    setViewActions(viewActions);
 
     d->view->contextMenu()->insertAction(
         d->view->contextMenu()->actions()[1], d->action_toggle_pkey); //add at the beginning as 2nd
@@ -209,10 +208,13 @@ KexiTableDesignerView::KexiTableDesignerView(QWidget *parent)
     plugSharedAction("edit_redo", this, SLOT(slotRedo()));
     setAvailable("edit_undo", false);
     setAvailable("edit_redo", false);
+    viewActions << sharedAction("edit_undo");
+    viewActions << sharedAction("edit_redo");
    //!todo qundo
     connect(d->history, SIGNAL(commandExecuted(K3Command*)),
             this, SLOT(slotCommandExecuted(K3Command*)));
 #endif
+    setViewActions(viewActions);
 
 #ifdef KEXI_DEBUG_GUI
     KexiDB::alterTableActionDebugGUI(QString()); //to create the tab


More information about the kde-doc-english mailing list