Commit 6072c9a9 authored by Tomas Mecir's avatar Tomas Mecir

few more fixes

parent 1e3d56ed
......@@ -658,6 +658,7 @@ void cConnection::reconnect ()
{
//inform plug-ins
invokeEvent ("reconnect", sess());
d->commandNum = 0;
//reconnect...
if (d->profileConnection)
......@@ -688,6 +689,7 @@ void cConnection::addCommand (const QString &command)
// technically, this is wrong, because the command can still be in the queue,
// but I believe it's sufficient
d->commandNum++;
invokeEvent ("command-sent", sess(), command);
}
......
......@@ -161,8 +161,13 @@ void cMultiInputLine::keyPressEvent (QKeyEvent *e)
if (ctrl == swapenters)
sendCommands ();
else
{
// need to make a new QKeyEvent, as we need to drop the ctrl modifier
QKeyEvent *enter = new QKeyEvent (e->type(), e->key(), Qt::NoModifier, QString());
//standard behaviour otherwise
QTextEdit::keyPressEvent (e);
QTextEdit::keyPressEvent (enter);
delete enter;
}
}
else
QTextEdit::keyPressEvent (e);
......
......@@ -55,7 +55,9 @@ public:
}
virtual QRectF boundingRect() const override {
return scene()->sceneRect();
QRectF rect = scene()->sceneRect();
// add +1 to each side to eliminate the selection box, which we do not want
return QRectF (-1, -1, rect.width() + 2, rect.height() + 2);
}
void updateSize () {
......@@ -141,6 +143,7 @@ cConsole::cConsole(QWidget *parent) : QGraphicsView(parent) {
//size policy
QSizePolicy qsp (QSizePolicy::Expanding, QSizePolicy::Expanding);
setSizePolicy (qsp);
setFocusPolicy (Qt::NoFocus);
// scene
setScene (&d->scene);
......
......@@ -48,6 +48,7 @@ cOutput::cOutput (int sess, QWidget *parent) : QWidget(parent), cActionBase ("ou
bgcolor = Qt::black;
setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding);
setFocusPolicy (Qt::NoFocus);
// connect cConsole to us ...
connect (con, SIGNAL (dimensionsChanged (int, int)), this,
......
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