Changeset View
Changeset View
Standalone View
Standalone View
krusader/KViewer/krviewer.cpp
Show First 20 Lines • Show All 367 Lines • ▼ Show 20 Line(s) | 367 | if (part) { | |||
---|---|---|---|---|---|
368 | if (!isPartAdded(part)) | 368 | if (!isPartAdded(part)) | ||
369 | addPart(part); | 369 | addPart(part); | ||
370 | if (tabBar.currentWidget() == pvb) { | 370 | if (tabBar.currentWidget() == pvb) { | ||
371 | manager.setActivePart(part); | 371 | manager.setActivePart(part); | ||
372 | if (part->widget()) | 372 | if (part->widget()) | ||
373 | part->widget()->setFocus(); | 373 | part->widget()->setFocus(); | ||
374 | } | 374 | } | ||
375 | } | 375 | } | ||
376 | } else { | ||||
377 | tabCloseRequest(tabBar.currentIndex(), false); | ||||
376 | } | 378 | } | ||
377 | } | 379 | } | ||
378 | 380 | | |||
379 | void KrViewer::tabChanged(int index) | 381 | void KrViewer::tabChanged(int index) | ||
380 | { | 382 | { | ||
381 | QWidget *w = tabBar.widget(index); | 383 | QWidget *w = tabBar.widget(index); | ||
382 | if(!w) return; | 384 | if(!w) return; | ||
383 | KParts::ReadOnlyPart *part = static_cast<PanelViewerBase*>(w)->part(); | 385 | KParts::ReadOnlyPart *part = static_cast<PanelViewerBase*>(w)->part(); | ||
▲ Show 20 Lines • Show All 328 Lines • Show Last 20 Lines |