Commit ed12184a authored by Boudewijn Rempt's avatar Boudewijn Rempt

do not use a single key shortcut in a menu entry

svn path=/trunk/koffice/; revision=924634
parent d69fe635
......@@ -15,8 +15,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_
#define KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_
#ifndef KIS_GRAY_COLORSPACE_H_
#define KIS_GRAY_COLORSPACE_H_
#include <QColor>
#include <klocale.h>
......
......@@ -72,10 +72,11 @@ void KisMacro::play()
undoAdapter->beginMacro(i18n("Play macro"));
}
for (QList<KisRecordedAction*>::iterator it = d->actions.begin();
it != d->actions.end(); ++it) {
dbgImage << "Play action : " << (*it)->name();
(*it)->play(undoAdapter);
for (QList<KisRecordedAction*>::iterator it = d->actions.begin(); it != d->actions.end(); ++it) {
if ( *it ) {
dbgImage << "Play action : " << (*it)->name();
(*it)->play(undoAdapter);
}
QApplication::processEvents();
}
......
......@@ -6,6 +6,7 @@ add_subdirectory( sumie )
add_subdirectory( chalk )
add_subdirectory( filterop )
add_subdirectory( complexop )
#add_subdirectory( dynamicbrush )
#add_subdirectory( cpaint )
if( BUILD_EVERYTHING )
add_subdirectory( dynadraw )
......@@ -14,6 +15,3 @@ if( BUILD_EVERYTHING )
add_subdirectory( spray )
endif( BUILD_EVERYTHING )
if( NOT MSVC )
#add_subdirectory( dynamicbrush )
endif( NOT MSVC )
......@@ -40,7 +40,8 @@ KisBrushOpSettings::KisBrushOpSettings( KisBrushOpSettingsWidget* widget )
}
KisBrushOpSettings::~KisBrushOpSettings() {
KisBrushOpSettings::~KisBrushOpSettings()
{
}
bool KisBrushOpSettings::paintIncremental()
......
......@@ -75,7 +75,9 @@ class KisToolBrushFactory : public KoToolFactory
public:
KisToolBrushFactory(QObject *parent, const QStringList&)
: KoToolFactory(parent, "KritaShape/KisToolBrush", i18n("Paint")) {
setToolTip(i18n("Paint with brushes"));
// Temporarily
setToolType(TOOL_TYPE_SHAPE);
setIcon("krita_tool_freehand");
......
......@@ -88,11 +88,10 @@ public:
: KoToolFactory(parent, "KritaSelected/KisToolColorPicker", i18n("Color Picker")) {
setToolTip(i18n("Select a color from the image or current layer"));
setToolType(TOOL_TYPE_FILL);
// setActivationShapeId( KIS_NODE_SHAPE_ID );
//setActivationShapeId( KIS_NODE_SHAPE_ID );
setPriority(15);
setIcon("krita_tool_color_picker");
setShortcut(KShortcut(Qt::Key_P));
setActivationShapeId("krita/always");
}
virtual ~KisToolColorPickerFactory() {}
......
......@@ -91,6 +91,7 @@ public:
: KoToolFactory(parent, "KritaFill/KisToolFill", i18n("Contiguous Fill")) {
setToolTip(i18n("Fill a contiguous area of color with a color, or fill a selection."));
setToolType(TOOL_TYPE_FILL);
//setActivationShapeId( KIS_NODE_SHAPE_ID );
setIcon("krita_tool_color_fill");
//setShortcut( QKeySequence( Qt::Key_F ) );
setPriority(14);
......
......@@ -113,7 +113,6 @@ public:
setIcon("krita_tool_measure");
//setActivationShapeId( KIS_NODE_SHAPE_ID );
setPriority(16);
setActivationShapeId("krita/always");
}
virtual ~KisToolMeasureFactory() {}
......
......@@ -66,7 +66,6 @@ public:
: KoToolFactory(parent, "KritaTransform/KisToolMove", i18n("Move")) {
setToolTip(i18n("Move a layer"));
setToolType(TOOL_TYPE_TRANSFORM);
//setToolType( dynamicToolType() );
//setActivationShapeId( KIS_NODE_SHAPE_ID );
setPriority(11);
setIcon("krita_tool_move");
......
......@@ -19,6 +19,7 @@
#define _KIS_TOOL_GRID_H_
#include <kis_tool.h>
#include <flake/kis_node_shape.h>
#include <KoToolFactory.h>
class KisCanvas2;
......@@ -69,7 +70,7 @@ public:
setToolType(TOOL_TYPE_VIEW);
setIcon("krita_tool_grid");
setPriority(17);
setActivationShapeId("krita/always");
//setActivationShapeId(KIS_NODE_SHAPE_ID);
};
......
......@@ -112,7 +112,7 @@ public:
setToolType(TOOL_TYPE_TRANSFORM);
setIcon("tool_perspectivetransform");
setPriority(12);
setActivationShapeId("flake/edit");
//setActivationShapeId("flake/edit");
};
virtual ~KisToolPerspectiveTransformFactory(QObject *parent, const QStringList&) {}
......
......@@ -72,7 +72,6 @@ ImageSize::ImageSize(QObject *parent, const QStringList &)
KAction *action = new KAction(i18n("Scale To New Size..."), this);
actionCollection()->addAction("imagesize", action);
action->setShortcut(QKeySequence(Qt::SHIFT + Qt::Key_S));
connect(action, SIGNAL(triggered()), this, SLOT(slotImageSize()));
action = new KAction(i18n("Scale &Layer..."), this);
......
......@@ -169,11 +169,19 @@ KoShapeManager* KisCanvas2::shapeManager() const
KisLayerSP activeLayer = m_d->view->layerManager()->activeLayer();
if (activeLayer) {
KisShapeLayer * shapeLayer = dynamic_cast<KisShapeLayer*>(activeLayer.data());
if (shapeLayer)
if (shapeLayer) {
dbgUI << "Current shape manager belongs to a shape layer " << shapeLayer->shapeManager();
return shapeLayer->shapeManager();
if (activeLayer->selection() && activeLayer->selection()->hasShapeSelection())
return static_cast<KisShapeSelection*>(activeLayer->selection()->shapeSelection())->shapeManager();
}
if (activeLayer->selection() && activeLayer->selection()->hasShapeSelection()) {
KoShapeManager* m = static_cast<KisShapeSelection*>(activeLayer->selection()->shapeSelection())->shapeManager();
dbgUI << "Current shape manager belongs to a shape selection " << m;
return m;
}
}
dbgUI << "current shape manager belongs to the man canvas " << m_d->shapeManager;
return m_d->shapeManager;
}
......
......@@ -93,6 +93,7 @@ KisLayerBox::KisLayerBox()
connect(m_wdgLayerBox->listLayers, SIGNAL(contextMenuRequested(const QPoint&, const QModelIndex&)),
this, SLOT(slotContextMenuRequested(const QPoint&, const QModelIndex&)));
connect(m_wdgLayerBox->listLayers, SIGNAL(clicked(const QModelIndex&)), SLOT(slotNodeActivated(const QModelIndex&)));
m_viewModeMenu = new KMenu(this);
QActionGroup *group = new QActionGroup(this);
QList<QAction*> actions;
......
......@@ -108,9 +108,9 @@ KisSelectionManager::KisSelectionManager(KisView2 * view, KisDoc2 * doc)
{
m_clipboard = KisClipboard::instance();
// KoSelection * selection = m_view->canvasBase()->globalShapeManager()->selection();
// Q_ASSERT(selection);
// connect(selection, SIGNAL(selectionChanged()), this, SLOT(shapeSelectionChanged()));
KoSelection * selection = m_view->canvasBase()->globalShapeManager()->selection();
Q_ASSERT(selection);
connect(selection, SIGNAL(selectionChanged()), this, SLOT(shapeSelectionChanged()));
KisSelectionDecoration* decoration = new KisSelectionDecoration( m_view );
connect(this, SIGNAL(currentSelectionChanged()), decoration, SLOT(selectionChanged()));
......@@ -319,11 +319,7 @@ void KisSelectionManager::updateGUI()
bool shapeCopyEnable = false;
if (shapeLayer) {
// TODO listen selectionChanded signals form the shapelayer
shapeCopyEnable = true;
// if (shapeLayer) {
// shapeLayerEnable = shapeLayer->shapeManager()->selection()->count() > 0;
// }
const QMimeData* data = QApplication::clipboard()->mimeData();
if (data) {
......
......@@ -21,7 +21,7 @@
class QString;
class KoXmlElement;
#include "KoXmlReaderForward.h"
class KoStore;
class KisDoc2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment