Set cursor in on_map instead of on_show (which segfaults sometimes?)

git-svn-id: http://svn.drobilla.net/lad@50 a436a847-0d15-0410-975c-d299462d15a1
This commit is contained in:
dave 2006-06-18 00:49:37 +00:00
parent 693092f2dd
commit 132647a493
3 changed files with 4 additions and 11 deletions

View File

@ -115,7 +115,7 @@ protected:
virtual bool canvas_event(GdkEvent* event); virtual bool canvas_event(GdkEvent* event);
virtual void on_show(); virtual void on_map();
private: private:
Connection* get_connection(const Port* port1, const Port* port2); Connection* get_connection(const Port* port1, const Port* port2);

View File

@ -70,9 +70,10 @@ FlowCanvas::~FlowCanvas()
void void
FlowCanvas::on_show() FlowCanvas::on_map()
{ {
Gnome::Canvas::Canvas::on_show(); Gnome::Canvas::Canvas::on_map();
assert(get_window());
get_window()->set_cursor(Gdk::Cursor(Gdk::HAND2)); get_window()->set_cursor(Gdk::Cursor(Gdk::HAND2));
} }

View File

@ -51,16 +51,8 @@ ObjectSender::send_patch(ClientInterface* client, const Patch* patch)
for (List<Node*>::const_iterator j = patch->nodes().begin(); for (List<Node*>::const_iterator j = patch->nodes().begin();
j != patch->nodes().end(); ++j) { j != patch->nodes().end(); ++j) {
const Node* const node = (*j); const Node* const node = (*j);
//const Port* const port = node->as_port(); // NULL unless a bridge node
send_node(client, node); send_node(client, node);
usleep(100);
// If this is a bridge (input/output) node, send the patch control value as well
//if (port && port->port_info()->is_control())
// client->control_change(port->path(),
// ((PortBase<sample>*)port)->buffer(0)->value_at(0));
} }
for (List<Connection*>::const_iterator j = patch->connections().begin(); for (List<Connection*>::const_iterator j = patch->connections().begin();