#define BACKGROUND_MAX_SIZE 512
+// Class variable
+//Container DrawingView::document(Vector(0, 0));
+
DrawingView::DrawingView(QWidget * parent/*= NULL*/): QWidget(parent),
// The value in the settings file will override this.
toolAction = action;
connect(toolAction, SIGNAL(ObjectReady(Object *)), this,
SLOT(AddNewObjectToDocument(Object *)));
+ connect(toolAction, SIGNAL(NeedRefresh()), this, SLOT(HandleActionUpdate()));
}
}
}
+void DrawingView::HandleActionUpdate(void)
+{
+ update();
+}
+
+
void DrawingView::SetCurrentLayer(int layer)
{
Object::currentLayer = layer;
{
if (toolAction)
{
- bool needUpdate = toolAction->KeyDown(event->key());
+ /*bool needUpdate =*/ toolAction->KeyDown(event->key());
- if (needUpdate)
- update();
+// if (needUpdate)
+// update();
}
}
{
if (toolAction)
{
- bool needUpdate = toolAction->KeyReleased(event->key());
+ /*bool needUpdate =*/ toolAction->KeyReleased(event->key());
- if (needUpdate)
- update();
+// if (needUpdate)
+// update();
}
}