-rw-r--r-- | noncore/settings/sysinfo/modulesinfo.cpp | 16 | ||||
-rw-r--r-- | noncore/settings/sysinfo/processinfo.cpp | 16 |
2 files changed, 30 insertions, 2 deletions
diff --git a/noncore/settings/sysinfo/modulesinfo.cpp b/noncore/settings/sysinfo/modulesinfo.cpp index 7abad69..3d127a8 100644 --- a/noncore/settings/sysinfo/modulesinfo.cpp +++ b/noncore/settings/sysinfo/modulesinfo.cpp | |||
@@ -98,2 +98,9 @@ void ModulesInfo::updateData() | |||
98 | 98 | ||
99 | QString selectedmod; | ||
100 | QListViewItem *curritem = ModulesView->currentItem(); | ||
101 | if ( curritem ) | ||
102 | { | ||
103 | selectedmod = curritem->text( 0 ); | ||
104 | } | ||
105 | |||
99 | ModulesView->clear(); | 106 | ModulesView->clear(); |
@@ -104,2 +111,4 @@ void ModulesInfo::updateData() | |||
104 | { | 111 | { |
112 | QListViewItem *newitem; | ||
113 | QListViewItem *selecteditem = 0x0; | ||
105 | while ( true ) { | 114 | while ( true ) { |
@@ -115,4 +124,9 @@ void ModulesInfo::updateData() | |||
115 | 124 | ||
116 | ( void ) new QListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage ); | 125 | newitem = new QListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage ); |
126 | if ( qmodname == selectedmod ) | ||
127 | { | ||
128 | selecteditem = newitem; | ||
129 | } | ||
117 | } | 130 | } |
131 | ModulesView->setCurrentItem( selecteditem ); | ||
118 | 132 | ||
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp index 769410f..2232771 100644 --- a/noncore/settings/sysinfo/processinfo.cpp +++ b/noncore/settings/sysinfo/processinfo.cpp | |||
@@ -103,4 +103,13 @@ void ProcessInfo::updateData() | |||
103 | 103 | ||
104 | QString selectedpid; | ||
105 | QListViewItem *curritem = ProcessView->currentItem(); | ||
106 | if ( curritem ) | ||
107 | { | ||
108 | selectedpid = curritem->text( 0 ); | ||
109 | } | ||
110 | |||
104 | ProcessView->clear(); | 111 | ProcessView->clear(); |
105 | 112 | ||
113 | QListViewItem *newitem; | ||
114 | QListViewItem *selecteditem = 0x0; | ||
106 | QDir *procdir = new QDir("/proc", 0, QDir::Name, QDir::Dirs); | 115 | QDir *procdir = new QDir("/proc", 0, QDir::Name, QDir::Dirs); |
@@ -134,3 +143,7 @@ void ProcessInfo::updateData() | |||
134 | 143 | ||
135 | ( void ) new QListViewItem( ProcessView, processnum, processcmd, processstatus, processtime ); | 144 | newitem = new QListViewItem( ProcessView, processnum, processcmd, processstatus, processtime ); |
145 | if ( processnum == selectedpid ) | ||
146 | { | ||
147 | selecteditem = newitem; | ||
148 | } | ||
136 | } | 149 | } |
@@ -138,2 +151,3 @@ void ProcessInfo::updateData() | |||
138 | } | 151 | } |
152 | ProcessView->setCurrentItem( selecteditem ); | ||
139 | } | 153 | } |