Commit 7c9f3fc5 authored by Robert Knight's avatar Robert Knight
Browse files

* Fix crash when detaching view with tabbed view containers.

* Handle switching between primary and alternate screens with ScreenWindow class.
* Remove hacks to update display after changing selection pending proper implementation.


svn path=/branches/work/konsole-split-view/; revision=640769
parent b94c0601
......@@ -1668,9 +1668,6 @@ void TEWidget::mousePressEvent(QMouseEvent* ev)
{
_screenWindow->clearSelection();
#warning "Temporary"
updateImage();
//emit clearSelectionSignal();
pos.ry() += scrollbar->value();
iPntSel = pntSel = pos;
......@@ -1999,8 +1996,6 @@ void TEWidget::extendSelection( QPoint pos )
//emit extendSelectionSignal( here.x()+offset, here.y() );
}
#warning "Temporary"
updateImage();
}
void TEWidget::mouseReleaseEvent(QMouseEvent* ev)
......
......@@ -194,8 +194,17 @@ void TEmulation::setScreen(int n)
{
TEScreen *old = currentScreen;
currentScreen = screen[n&1];
if (currentScreen != old)
if (currentScreen != old)
{
old->setBusySelecting(false);
// tell all windows onto this emulation to switch to the newly active screen
QListIterator<ScreenWindow*> windowIter(_windows);
while ( windowIter.hasNext() )
{
windowIter.next()->setScreen(currentScreen);
}
}
}
void TEmulation::setHistory(const HistoryType& t)
......
......@@ -234,9 +234,10 @@ void TabbedViewContainer::viewAdded( QWidget* view )
}
void TabbedViewContainer::viewRemoved( QWidget* view )
{
Q_ASSERT( _tabWidget->indexOf(view) != -1 );
const int index = _tabWidget->indexOf(view);
_tabWidget->removeTab( _tabWidget->indexOf(view) );
if ( index != -1 )
_tabWidget->removeTab( index );
}
void TabbedViewContainer::updateIcon(ViewProperties* item)
......
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